Puakma: Under the hood

I'm Brendon Upson, jack-of-all-trades, master of one or two. I'm talking about life running a small ISV tackling business issues and leaping technology hurdles in a single bound.

webWise Network Consultants is based in Sydney, Australia and develops the groundbreaking Tornado Server technology.

Multi-Threading apps

Filed under: by Brendon Upson on 2008-07-07

Last week we upgraded the office VMware server. It's now running an Intel Core2 quad CPU with 8GB RAM. I can't believe how much the price of hardware has fallen. This replaces a 5 year old dual CPU Athlon 2100. The performance leap is HUGE.

Which then got me thinking. The trend is to add more and more cores to CPUs, which is great so long as the software that runs on it is multithreaded. Sure you'll get a good boost by running multiple applications, but what about web applications? Yes, two incoming web requests run in their own threads and there is a certain amount of parallelization (is that a word?) within that request, but at some point the web server will run your custom code which does the actual work. How well does that cater for a parallel approach. My guess is in most cases, not at all. Here we have a bottle neck. Add 100 more cores and your code will go no faster. 

Ok, so just make it multithreaded?

Well, not so fast. This is a difficult LOGICAL problem. Consider you are writing a lump of code to dress a person. Can you put shoes and socks on at the same time? Do trousers come before or after shoes? For most tasks there is a sequential order. It is a difficult task to determine which tasks can be run in parallel and which are sequential and usually there is a combination of both task types.

As programmers we are on the cusp of having to change the way we think about problems and probably use some new tools to get that work done.

Apple, Google, MS and things to come

Filed under: by Brendon Upson on 2008-07-04

Here's a few random thoughts.

1. I managed to snap my right arrow key on my macbook pro (my fault completely....). I though I could get a replacement KEY. No. I have to buy an entire KEYBOARD. Thats $95 plus $75 for a half hour labour. Robbery. Apple will never make it in the server market until they change their hardware support (which is notoriously bad) and pricing.

2. iPhone 3g - big deal?

Sure, it's "just a phone". The device itself is not entirely a market changer, but the way we will use it will be. More and more we will use this (and devices like it) more than we use our PC. Why? Because it's convenient, it's always with us and always connected. This is why the blackberry has been so popular. The difference with the iphone is that for the first time we have a decent size screen and an intuitive way of interacting with it. IMHO microsoft have totally lost the plot. The Windows franchise is dying quickly as worthy competitors in Mac OS X and Linux are hammering at the gates and their online strategy is seemingly non-existant. Devices like the iphone and later Andriod from Google will serve to completely bypass the traditional PC business, meaning Windows and desktop operating systems will become redundant. The phone IS the PC.

Feed, change, sleep, repeat

Filed under: by Brendon Upson on 2008-07-01

Last week saw the arrival of Brooke Ada Upson. Life as we know it will never be the same again. It's amazing how such a small life form can completely transform your world! It's the small things that have changed - like sleeping at night.

 Needless to say we're completely overjoyed at our new arrival but still trying to understand how she works. If I disappear for long periods - now you know why.

brooke.jpg

Birthday!

Filed under: by Brendon Upson on 2008-06-13

Weeeeeell. Today marks the "official" 7th birthday of Puakma. Truth be told I don't know the exact date it all started, but it is definitely somewhere around this time.

It's been a surreal last 6+ months with all sorts of weird and wonderful projects here at WNC, and I'll be the first to admit that public releases of Tornado have not been near the top of the list. Today we'll change that. The 4.1 release is now public.

Puakma Enterprise Server Platform v4.1.23 Build:818 - 4 June 2008
http://www.puakma.net/wnc/dltk.pma/GetLatestSoftware?OpenAction&PartNumber=PT0022 
Enjoy ;-) 

Hollywood needs a slap

Filed under: by Brendon Upson on 2008-05-16

There's a show I've been watching, but due to pre-natal classes I've only ever seen the first half hour and miss the rest. Call me old, but I'm lovin' Grand Designs Abroad. But I never get to see how the houses turn out!

Amazon to the rescue. I log on to Amazon UK (bit torrent is naughty, don't do that) and locate series 3 and 4 DVDs and order them. Amazon's super service has them to me in super quick time. Perfect. Next I poke the DVD into my MacBook and......

dvdregions.png

Bah! The disk is coded for region 2 and I am in region 4. This sucks and blows all at the same time. Here I have done the right thing and purchased a legit copy and now can't play it - well I can, it's just that I can only change the region on my DVD drive 4 times before it's locked to the last region.

Fortunately I have a PC with a LiteOn drive wich seemed to not care so much about this region business and read the disk ok with a pesky region change. All files are now copied to disk and I'm able to watch it with VLC player. Of course you could also use this: http://www.mrbass.org/dvdrip/ ;-)

Question is what would a mere mortal do that does not have access to extensive computer hardware and software, let alone even understand this confusing region coding?

Region coding is only good for the movie studios so they can charge $35 for a DVD in Australia and 3 rupees in India. DRM is bad for the customer. 

Product Company vs Services Company

Filed under: by Brendon Upson on 2008-04-29

For last last 6 or so years I've been running a company that is split between products (software) and services (contract software development). As the services side demands more of my time, I am increasingly questioning the "value" of a services business. In this context I am referring to a services business as a business which requires a human to perform some service at an hourly rate for another company.

Growing a services business is difficult. Since a human is providing the service, to provide more service you need either a) more humans, b) more revenue per service or c) more time. Scaling these variables is challenging part.

  1. We know that time is fixed and that 100% capacity is 168 hours per week, in reality much, much less, around 40 hours.
  2. We also know that companies have a natural cieling for what they are willing to pay for a service, let's say $300/hr.
  3. We know that the more complex the service provided, the more difficult it is to get additional qualified staff to perform said service. 

So, according to the variables above, the only real way to expand a services business is to add more staff. In reality, as the number of customers grow other activities take up an increasing amount of time in communications, account management, staffing issues, etc. Thus the original 40 hours begins to fall as more and more hours are taken up with non-billable time.

As a small business it is almost impossible to compete for the high end consulting work as customers deem you as high risk. A perceived "safer" choice is to engage large consulting companies with supposed "experience". The reality is the large consulting company will subcontract out the work to smaller suppliers such as myself while skimming a (often large) margin. 

Another factor particularly important in IT services is the fact that software development projects are not discrete. That is, it is unlikely for a software development project to actually end. We regularly have projects that come back like the ghost of Christmas past as the customer wants to add a few more tweaks and updates. Conversely, if you are an an excavator operator you dig a hole and leave, the customer will never get you back to continue work on the same hole to perhaps turn it into an airplane ;-) These continual mental context switches, jumping back to projects that were developed years ago, is a real mind bender and absolutely kills concentration since a small change involves relearning what was done in the past and what the implications of adding the new change are.

The provision of complex services require the use of competent and highly skilled staff. The more complex the service, the higher the staff knowledge needs to be. A couple of examples: 1) You run a window washing business. 3 of your staff members leave to go backpacking. It is very easy to replace them since after around 30 minutes of training you are a competent window cleaner. 2) You run an obstetrics business (you deliver babies). 3 of your staff leave to become GPs. Replacing them is a difficult task since they need a medical degree plus more years specialising. Software development is somewhere in between.

So what's the bottom line? If you plan to run a small services business you need to really think about the economics and compare that to working in some other services business. Effectively you are buying a job and a lot of headaches (tax, accounting, marketing, planning, staffing, ...). 

Product based companies scale much better. If you make widgets, selling one or ten requires little extra effort. You can also engage less skilled staff in the sales and billing parts of the company to streamline the sales and billing process. In addition the negagement of resellers further alleviates the sales burden. Rather than dealing with 100 customers directly you deal with say 10 resellers. Sure, you take a small hit on the margin but the resellers really absorb a large portion of the sales effort.

Now I'm sure the skeptics out there may not believe the above hypothesis, so here's some research for you: Take a look at the following top 50 companies for 2007 and work out the proportion of products vs services companies. The results should be obvious. http://www.diversityinc.com/public/1595.cfm

BBTF - Bring Back The FUN!

Filed under: by Brendon Upson on 2008-04-16

in the last few weeks I've been taking a rather critical look at what I do. One thing became abundantly clear I have somehow managed to push aside most of the stuff that I love to do to make way for the stuff I have to do. End result = unhappy camper. Last Monday I started making some changes.

Some of you may know I play the guitar. When I was younger I played it LOADS. It's something I really enjoy but somehow in the last 10+ years I never was able to make time to do it. On Monday I visited the local guitar store and bought a shiny new guitar stand and some new strings (Mmmmm DR 9 to 42's rock!). Now I have my guitar set up right next to the desk. When I need to think something over I'll pick it up and play it for a couple of minutes while I mull over the problem. Two birds, one stone. Perfect.

I had completely forgotten how great that guitar is. Sadly in the same music store they are selling the Ibanez RG550 "20th Anniversary" model. Bummer I have the original and I now feel oooooold! 

 bbtf.jpg

 

Eating dogfood with i18n

Filed under: by Brendon Upson on 2008-04-09

So Tornado is getting pretty mature, but all the work to date has pretty much revolved around a single company server where everyone is in the same timezone and speaks the same language. Until now :-(

As we peg away at ProjectReactor, things crop up. Important things. Let's say we have a project with 2 project managers, one in Sydney Australia and one in New York USA. The Sydney PM enters a milestone to be due mid-day friday, when the New York PM looks at the same record he also sees due mid-day friday. Disaster! Different time zones.

Then there's the date input formats. Sydney PM uses "dd/MM/yy" and New York PM uses "MM/dd/yy". Ouch. How do we make one application design easily cater for the different formats (and also "yy/mm/dd" and many other variations)?

When you have the sourcecode, anything is possible :-) 

Step one: Extend the session object. Add two new attributes to the session; time zone and locale. Upon login we get the timezone from the browser and the locale (language) from their account record. The server code then uses these new properties (if they have been set) when dealing with dates. If they are never set by the application then we default to the server's locale.

Step two: Custom date input formats. This was the tough one. The Tornado app uses <P@Date @P> fields with a format attribute, eg <P@Date name="x" format="dd/MM/yy" @P> The format attribute is stored in a page design element and is certainly not easy to change on a per user basis! Custom session objects to the rescue. Tornado allows any kind of object to be stored on a user's session. So now we just store a session object called "dd/MM/yy" on the session and give it value we want for that user eg "yy.MM.dd". Now when the server is parsing and rendering dates it does a check on the session to see if there is a session object of the same name as the format attribute's value, if there is use this value instead of the format attribute value. If there is no session object by that name, then just use the value this allows it to work either way.

i18n_pr.png

My head hurts. I'm off to bed.