May 26

The Rails Development Pattern

Ruby, Tech 14 Comments »

The team that I am is kicking into gear with Rails now. I am finding an interesting pattern in how development is going…. and it has happened before with new technology but seems even more so now:

  1. Get new requirement
  2. Start hacking on new code to fulfill requirement (Solution: X lines of code)
  3. Chat with another team mate who knows of a plugin that does half of this (Solution: X / 2 lines of code)
  4. Look at Rails Recipes and realise there is a better way to get into it (Solution: X / 4 lines of code)
  5. Generalize the problem and use MOP to simplify it’s usage (Solution: X / 10 lines of code)

At the end of the day you sit there and realise that you spent the entire day writing 100 lines of code and then deleting 90 of them. :)

May 25

Pick ONE: Atom or RSS

Tech No Comments »

Sam Ruby is talking about others talking about picking one feed.

Since tools such as feedburner do the work to sniff what clients need/can grok, who cares about all of this stuff anymore? ;)

May 25

JavaScript Off? Who cares?

Tech No Comments »

Most people have JavaScript on right? Some don’t, but how much effort do you put into handling that and gracefully degrade?

It kicked in with me recently as I worked with an application that had Webkit embedded but turned off JavaScript support.

Working with this cripping made things clear that a lot of people really do require JS these days.

As much as we give lip service to accessibility and degradability how many people are really doing it. It is too hard to make people do it in their projects as developers need to give business value to their users.

I think that this will be a problem until it is as easy to add accessibility into our applications as it is NOT too (e.g. higher level frameworks need to handle it for us).

May 24

Event Driven Web Architecture

Tech 2 Comments »

I got into a chat at the Ajax Experience about the side effects of COMET-style development on the web.

Currently developing COMET apps is tough due to the server side of the equation. Solutions are coming here though, and we will have COMET servers that will grok the new model, which is an event driven architecture.

If we take this further, I could see a world in which I build my web applications as a set of events rather than just thinking of request/response (which is limited events).

This will fit perfectly into many worlds:

  • The Collaboration Web: publishers and subscribers are first class citizens, so it makes it trivial to create collaborative applications vs now when it is complex
  • Web services / SOA: I am finding that my web “sites” are now compositions of services that talk to eachother or to the end user. Events flow through the entire process, and the “user” is just someone who can take part in the events
  • Caching: I am a big fan of caching. From Tangosol Coherence, to memcached (man I would love Coherence for Rails…. I don’t believe in using the DB as heavily as DHH and co). A lot of the applications that I am working on currently are typical web apps in that they are heavy on reads. My caching system is based on events pumping in, and listeners take care of invalidating and filling up the cache when appropriate (caching in memory and html fragment caching). Even this low level world fits in with the event driven web

Dave Sifry talked about how the web wasn’t a library of pages, but rather a sea of events. How will the tools change, and our architectures to work with this?

Will we cling on to simple request/response because we know it, and it is simple (until you want to do something else….)?

May 22

Imagine getting interviewed on something you know nothing about

British, Personal 1 Comment »

The BBC managed to interview the wrong guy on the Apple Corp vs. Apple Computer lawsuit.

Guy Kewney, a white, bearded technology expert was astonished to see himself appear on screen as a black man with an apparent French accent.
The BBC were interviewing “Experts” on the Apple Corps vs Apple Computers legal case. They called for the “Expert” a Mr Guy Kewney, but a Mr Guy Goma raised his hand. A mic was attached and he was put live in the studio to answer questions.

He was a cab driver waiting for job interview.


May 18

Beware the Sun Legal Slide Shifters

Tech 3 Comments »

One of the fun parts of the JavaOne conference, is getting your slides changed before you by the lovely legal team at Sun. If you have spoken at JavaOne before you know that you should get to the “Speaker Ready Room” as early as possible to go through your slides with the “specialist”.

Sun takes your slides and does two interesting things to them:

  • Converts to lovely StarOffice (it is bad enough to go from Keynote to Powerpoint)
  • Puts a TM next to every other word

When Ben and I saw our Ajax talk, the term Ajax had been converted to AJAX throughout. The worst offence was changing the term JavaScript to “Javascript Technology”. It made no sense at all.

This is small fry compared to what happens to others. For some reason transitions are often broken. This lead to one friend having the following issues:

  • If they had a few bullets that came in one at a time, the first would be there, and NEXT would go to the next slide (not the next bullet)
  • A full animation sequence had to just show the last form of the sequence and they had to talk around it

So, beware.

May 08

Scaling out 37 Signal-style applications is convenient

Ruby, Tech 4 Comments »

I had someone telling me that:

Ruby can scale. Basecamp prooves that.

Now, you all know that I do not think that Ruby has ANY problems with scaling. However, applications such as basecamp have a huge advantage for scaling: minimal shared data.

The key to scalability is minimizing access to the same data. The less anal you are about how “correct” the data is the better you will be.

Microsoft Word scales very well as when a million people are writing a document, they are not editing the same one (I know, they could be on a shared drive blah blah).

Caching and all of the tricks are ways in which we can cheat the system. We can make copies of our REAL data and access those instead. This works for a lot of applications, and a lot of data. This is why you see “this stock data may be up to 15 minutes old”. Imagine if everyone needed access to the stock price right NOW. I mean NOW. I mean…..

To scale probably, you want to minimize any locking. How stale can your data be in different aspects? The more stale that you can deal with the better.

Where does Basecamp and company fit in here?

One of the great advantages to those applications is that there is little shared data.

If I sign up for an account for my company I can have a large amount of data on Someone else can have, and no data is shared. I do not need (or should be allowed) access to their data.

This means that if they wanted too, we could be on two different machines with out own MySQL instance. One per user doesn’t make sense of course (unless the users are GE and Ford), but how about splitting up: A-M and N-Z.

If load keeps going up you split again, and again, and again.

If you are in this situation you are a lucky man, and should be able to scale up anything :)

If you have an application where there is more shared data then you may need to get more creative. A lot of web apps are heavy on reads so you can scale up nicely via MySQL replication and putting out more slaves, but at some point the master will not be able to handle the writes. This is when you need to Give the DB a break! and use caching, and tweaking your archicture into pieces.

We do this with out Rails apps by making parts and pieces web services that we can scale up separately, but there is always the bottleneck on some part of the darn data!