(Custom Mediations) ^ 2

To recap, WebSphere ESB provides a bunch of re-usable mediations out of the box that you can use in your mediation flows to alter message content (XSLT mediation), filter on it (Message Filter mediation), and so on. However, it also provides the facility to create your own mediations, called ‘custom’ mediations, in mediation flows. Typically, you’d use these when the provided mediations can’t do something you want to do. They are SCA components implemented by a Java class, so appear in the assembly diagram for a mediation module (where you’ll see that the mediation flow component references them), but they also appear in the mediation flow itself as a mediation. They provide an execute method, which has a DataObject as a parameter (message coming in) and return a DataObject (message going out). This is where your logic goes. Normally you don’t need to worry too much about all of this, as WebSphere Integration Developer makes it easy to create a custom mediation in your flow like any other mediation, and creates a Java skeleton for you - all you have to do is define the method. You can’t specify any of your own parameters on a custom mediation, so typically you’d use these where you are doing something specific that you’re unlikely to re-use. Nigel Daniels has written an excellent article on how to implement custom mediations.

There is an alternative. You can create your own first-class mediation primitive that has its own icon in the WID mediation flow editor and can have custom properties. This is more work, as you are essentially creating a mediation equivalent to those supplied by WebSphere ESB, but it is thus suitable for re-using in many mediation flows. Confusingly, these are sometimes called custom mediations also (probably because they don’t really have a name). For example, you might write a generic mediation primitive that could do arithmetic on an incoming message, according to a set of parameters you specify. There is a document on the IBM website that describes how to create them.

Full Deregulation in the UK Telecoms Market

From an Ofcom letter I just received with my phone bill:

‘…on 1st August 2006, Ofcom, the UK telecoms regulator, ended the formal controls on the cost of phone line rentals and calls from BT. This will leave all phone companies, including BT, free to set their own retail prices for consumers.’

Hoorah! It’s taken a long time, but it’s good to see Ofcom finally taking this important step towards maturity in the UK telecoms market. Less government interference in such a crucial technological industry can only be a good thing. Whether they will take the next logical step and dismantle the now redundant tax-funded part of their organisation remains to be seen.

Now here’s hoping for full and proper deregulation of some other utilities: post, water, gas, etc…

Menus and Food Quality - In Practice

More worrying menu indicators, this time based on an actual Chinese takeaway menu that arrived through my door:

  • A massive 222 items in total.

  • Numbers next to the items.

  • ‘Orders over £12 - Free Curry Samosa’. Hmm, how Chinese. In fact, there is an entire Curry section, including a Chips option.

  • The menu has plenty of ‘Improved recipe!’ and ‘New!’. Does this come from the McDonald’s school of menu design?

But it would be unfair to mock this menu without trying it. So I have just finished eating Fried Duck with Ginger and Spring Onion (#69), and Egg Fried Rice (#143). And the verdict: 7/10. OK, but not superb - the rice was a bit dry, and the sauce a bit greasy. They also inadvertently added on one more indicator during the ordering process: I was told it would take an unnervingly precise 12 minutes before it was ready.

So that’s one data point for this scientifically accurate menu/food quality study.

The New York Times and Graphical Maturity

In Edward Tufte’s dry-sounding but classic book on data presentation, The Visual Display of Quantitative Information (which is actually very readable), he draws up a table of the ‘Graphical Sophistication’ of 15 international news publications (see page 83). Der Spiegel and The Economist do well, as do two Japanese papers, Asahi and Akahata. The New York Times comes about half-way down the list. I was reminded of this earlier when I saw this graphic in the NYT, which accompanies a story on the decline of marriage amongst middle-aged men. Although even I could spot some lessons from Tufte’s book which could improve it, it’s heartening to see that grown-up statistics and presentation are nevertheless alive. One of Tufte’s core rules is to ‘Maximize the data-ink ratio, within reason’. This graphic is a good example.

The book is rated ‘One of the best 100 non-fiction books of the 20th century’ by amazon.com.

Loadsa Money

Imagine an auction with these rules:

  • There are 20 people in a room, who can’t communicate.

  • They are bidding on £10 provided by the auctioneer.

  • They each have to put a sealed bid in.

  • Each one has to pay the amount they bid to the auctioneer whether they win or not.

  • The winner gets the £10.

The real puzzle is, what’s your strategy as a bidder? And just to complicate things, consider this: bidding £11 may not be a dumb thing to do. It turns out that the auctioneer often makes a lot of money first time round.

This puzzle comes from the Econtalk podcasts, which I’ve been listening to a lot today, so please listen to that for more discussion. I’m trying to avoid borrowing from others’ content on this blog, but this was so interesting I couldn’t resist - Russ Roberts, the host, seems to focus particularly on practical microeconomics, so if that’s something that interests you, run, don’t walk to your MP3 player.

subscribe via RSS