Tuesday, November 21, 2006

Ruby and SDL again.. now I am finally getting time to write my game

So, I have had an on going dream project.. writing a game in Ruby... I first started this years ago, and it was an ambitious project, a multiplayer online virtual world.. pretty much what everybody starts out trying to do.

Then I got a new job in London, and it all went to pieces. Now finally I am picking it up again, with a careful plan.. start with something simple, and finish it, creating a game engine and getting a feel for things in the process, then move on to something more complicated, finally finishing with my multiplayer online game.

Of course the whole operation is great fun, as I am working with ruby, and SDL seems to do a pretty decent job in terms of coping with all the different OS platforms out there. Yes, you would be right in thinking that in-game art is going to be the toughest part of this! I have no graphical talent.

Progress is good, I am calling the project Spacewars for now, and it is based on a game I played when I was about eight years old on an Amstrad CPC. For more information checkout www.rossputin.org/projects/.

Friday, November 10, 2006

I am setting up my own dedicated server, its fun for a geek!

As mentioned in my previous post, www.rossputin.org (down at the time of this writing) is moving to my new dedicated server, and this is opening up a whole new world to me, involving hosting my own DNS, when previously I could only work from the Apache stage onwards. I have always classified myself as a software developer/architect, so doing these sys admin type of tasks is new ground, but definitely informative.

Of course because this is my own server (well, shared with a colleague at work) and these websites are my own.. I am striving to crank the maximum performance possible out of them. Its good fun actually... benchmarking for speed and seeing exactly what kind of performance I can get out of them!

The server will be cranking out plain old html pages, and pages served from a Cocoon instance. I am going to list some benchmark results from both here. First up, with no caching.

Plain html

using Apache Benchmark with 100 consecutive requests, we get:

Requests per second: 1155.13
Time per request : 0.866

(fast as expected, its just html)

Home page of Cocoon App

same apache command:

Requests per second: 110.51
Time per request : 9.049

(not so fast, of course.. as expected)

So I am prepared to accept 110.51 requests per second in consecutive tests.

Now lets look at some more serious stress testing :-)

Lets look at concurrent requests...

ab2 -n 10000 -c 50 http://www.my-non-cached-website.com/

will run 10000 requests with 50 request concurrency :-)

The results on my cocoon instance behind apache are:

Requests per second: 172.98
Time per request : 289.045

Now once again, clearly this is fast enough for a hobby homesite.. by why make the server do any more than it needs to, why overwork Cocoon, content is hardly changing very often.

Lets plug the caching in and repeat the tests :-)

Same ab2 command... ab2 -n 10000 -c 50 http://www.my-cached-website.com/


Results on cocoon instance behind apache:

Requests per second: 1602.96
Time per request : 31.192

Sweeet!!! Apache is very cool.

Thursday, November 09, 2006

So finally, after trying 'Ruby on Rails' on for size...

I have officially ditched it....

Ruby is arguably the best programming language on the planet right now, superbly crafted, but it can do a great deal better than Rails for a web platform. I gave it a decent try, but too many aspects just do not fit, particularly the templating language. All in all these nuances just seem to be geared to get you up and running as fast as possible, great for beginners, but the minute you look under the hood, you are faced with an increasingly unpleasant picture.

So I am pushing my website Rossputin.org across to Cocoon on my new dedicated server.

Talking to the guys in the Cocoon community, this seems to be the general trend. A brief 'fall in love' with Ruby on Rails, followed by finding a lack in power and in some cases sanity, followed by ultimately returning home to those 'other' frameworks out there.

One to watch out there in my opinion is certainly Wicket.

Saturday, October 07, 2006

LDAP domination of the world, (with a little help from SyncML)

So it seems LDAP is everywhere helping me out at the moment.. this time with the holy grail of centralised contacts and calendaring, pushing to my phone over the internet!!!

So here is the deal.. you have a phone, and you have contacts in Outlook, and in Thunderbird, on many different machines... how to sync them..without plugging wires in every time?

The answer, Funambol Open Source... basically its LDAP, pushing to any device with no tweaking.. and through SyncML which all modern phones have... we can sync over the internet.

Some links to get you started.. Funambol Portal, and Schedule World.

Friday, October 06, 2006

The Cocoon GetTogether 2006

Wow.. on top of a project launch at work, preparing for the GetTogether was really tough.. luckily I had Jeremy as my talk partner, and to be fair he did most of the work!

The whole thing was a fantastic experience, Arje organised everything, great Ribs at the dinner, a a busy exciting schedule , it was my 3rd GetTogether, and my first time talking at a conference ever. So there were some nerves, and a couple of little glitches with the presentation, but Jeremy and I managed to talk clearly and fairly concisely on every one of our slides, and the whole thing went down quite well. A few people approached Jeremy and myself afterwards expressing interest in what we had done with LDAP.

As I promised in my previous post, here are the slides, along with those of all the other talks, GetTogether 2006. Here is the evidence.. Jeremy and I talking!

Friday, September 29, 2006

LDAP full circle, and an excellent opportunity to talk at the GetTogether

Ha, excellent, my view has flipped completely over the last 4 months or so regarding LDAP. I started off sceptical, and maybe a little bewildered as to why it is a viable alternative to relational DB's back in June. Then talked to Jeremy Quinn, and started to see the possibilities, and more recently, in the last month, I have in fact started to champion LDAP in the workplace !!!

Now finally things have gone full circle, and I have the fantastic opportunity to speak on Cocoon and LDAP integration at the Cocoon GetTogether. I am lucky enough to have the benefit of collaborating with Jeremy on this talk, and have learned a lot from him. I will not spoil the details of the talk.. a sketch is available at www.cocoongt.org. After the talk, we will ensure all slides are available.

At VNU, we are just about to launch a new website for France, part of which integrates with a massive LDAP instance, holding 23 gig of data just for the UK. This was an excellent learning process, and sparked the idea of the Cocoon talk, to try to help out by providing simple, clear documentation for others who might like to do something similar.

Anyhow, watch this space for more info!

Friday, August 11, 2006

Further Cocoon success with the company

Wow, since stepping into the role of architect and developer for the european team, my time has really been at a premium!
Its been a challenge, as we are a new team, working against an aggressive launch timetable. But just a couple of weeks ago, we launched our second country on the platform, with www.vnunet.fr. This was our first launch with me at the helm, and it was daunting to say the least!

But at the same time, what an experience!!! I have learned even more, and am satisfied that things are stable, and in our control. Once again, Cocoon to the rescue, it seems the long ours required to comprehend such a massive system are paying off.

Now on to our next launch (already)... another French site to follow.

Friday, June 16, 2006

Cocoon, my preferred platform for web development

I thought it was about time I posted something on the platform I have been producing sites and applications with for about two years now, Cocoon. We use Cocoon at my company VNU BME Europe for all our main business websites. Initially this was just within the UK where we have had some fifteen or so websites running on Cocoon 2.1.5 for about two and a half years. Our sites get vast amounts of traffic, and all 15 are running off three live machines, with the load spread by two proxies. The platform was designed and architected by a friend of mine Pier Fumagalli (of Java, Apache and Cocoon fame), and thanks to him I have had some excellent experience in working with high load sites, and cutting edge XML publishing systems.

More recently, Pier once again designed the basis for a new platform which we are rolling out across Europe (already live in Italy), see the following list of sites;


This time my role, aside from the custom Cocoon templating language Pier built, was much more involved in architecting key parts of the system, this was great experience for me at this point in my career. The Italian websites have so far been up and running for some ten weeks, so far so good. France and Spain are soon to follow! Just a few weeks ago, I stepped up into Pier's role as Application Developer and Architect, as sadly he has decided it is time to leave the websites business after spending the best part of the last fifteen years in it. So now the challenge, and problems to solve are mine, lets hope all his help and passing on of knowledge has set me in good stead!

So why Cocoon? Well, we, as part of the publishing world, opted for XML as a format for handling articles, (common sense really), and Cocoon is just about the most complete XML manipulation toolkit you can find. Currently on 2.1.9 stable, it is a little more complex and heavyweight than many platforms, but just enables you to do things in a very tidy way when the solution is thought through carefully. Our platform is a stripped down version of 2.1.9, with a custom templating language built on, and a nice 'inherited' component system. It enables our designers to build entire sites in a matter of days once the core generic components are available, this enables us to work with a small agile team of developers.

Hope you go take a look at Cocoon, its worth a try. More details to come soon!

LDAP revisited

I had a chat to Jeremy Quinn of Cocoon and Apache fame on Wednesday regarding whether LDAP is in fact an over elaborate death trap designed by a Bond villain... and he was enclined to disagree. Jeremy has worked with both relational DB's and LDAP before, and emphasised that the biggest advantage LDAP has is that it is naturally hierarchichal in terms of organisation. With relation DB's you kind of 'fake' hierarchy, this seems to me to be a valid point. Furthermore, modifying LDAP at any time during a projects history is easy, classes do not need to be re-compiled etc etc, whereas we know how many mechanisms have invented to ease this process when using DB's. Thanks Jeremy, finally I have a glimmer of understanding as to why we should want to use this (not so) new fangled technology in place of a simple Mysql installation! More reading and playing with LDAP to come!!!!!!

Sunday, June 11, 2006

Buzzwords, 'cool' technologies, and finding a real use for things

It seems to me, that despite IT being loosely based on science, there is a massive amount of hype over some not so recently emerging concepts, (Ajax for example), and that we sometimes invent too many ways to do the same thing (relational DB versus LDAP. I am not by nature a procrastinator... but I spent a lot of time recently trying to find a use for Ajax within our many varied websites at work, and in trying to decide whether LDAP is better for a registration project than a simple relational DB.

So first, lets look at Ajax. Firstly, we all already know that what was coined as a marvellous new technology has been around for an eternity with varied different names. But Ajax 'sounds cool'. Ajax removes the need for the page to refresh, hmm, provided you pages are quick in the loading... not much of a biggie there I reckon. Don't get me wrong, I can see a place for Ajax in very specialised online 'tools', and I love the stuff the Dojo boys are doing, but it is really hard to find really really real useful uses for this stuff. If I got a quid every time someone said 'and now we really want to use Ajax on our sites', I would be able to give up working... well OK, maybe not, but I would be able to buy myself plenty of beer :-)

Now on to LDAP. Simply... why? Why use this instead of a relational DB? I am no expert on the LDAP spec, I have a great deal of reading to do, but I am already fully aware that nobody seems to be able to give me a concrete answer on why we should use LDAP for our registration project. Can anyone convince me that LDAP is not like an overelaborate and doomed to failure death trap designed by a super villain from a Bond movie? If I ever figure this out, I will be sure to revisit this blog post!

Monday, April 10, 2006

OK, its time to be professional, some Ruby and SDL on Mac thoughts

At this point, I have been blogging for a few years now, and I have to admit most of it is gibberish, so its time to get some sensible thoughts down, on my favourite fields, software, and technology.

I will start with my very favourite, Ruby, and the announcement that I finally got the Ruby integration of SDL sorted this weekend, and can now pick up where I left off with my game project... which has not been touched for about 2 years :-(.

So I have SDL images, fonts, sounds all operational on my Powerbook.. not the easiest thing to do...

the first resource for assisting with this is.. http://inquirylabs.com/blog2005/?p=21, and the second, slightly better one in my opinion is... http://www.ralphdouglass.com/static_content/rubysdl_on_osx

excellent, game creation on my favourite platform with the best programming language in the world!!!!!