Archive Page 2

19
Oct
09

Long time no see !

It has been quite a while, and I have been up to lots of interesting things, mostly under NDA! Journalism has been sadly low on my priorities. Once a couple of public launches are out of the way I will have more to say on that.

In the mean time, here are some thoughts on varnish, one of the unsung heroes of everything from twitter to the larger public blogs. It is a so called “reverse proxy” – a really smart cache that is fantastic for allowing me to concentrate on two things separately – making great sites based on rapid dynamic technology, and scaling.

Varnish is no magic bullet – it works best for sites that are personalised and dynamic but where the actual number of things people are looking at on mass at any one time is relatively small.

I am currently using it to front a search site, not so much for the caching but because it is an interesting way of doing two things – basic load balancing and fail-out, and page assembly. In my case I use ESI in varnish to composite fragments dynamically assembled by a set of google appliances with elements that change less often.

It has worked out fairly well, with a couple of gotchas – gzip compression and ESI are not happy bed-fellows with varnish, and so I have to force requests to the appliance not to use compression by filtering the header as it comes from the browser. Varnish also does not handle SSL, so you need to terminate any SSL “around” varnish with port mapping trickery to something that can handle it like apache.

Given that ESI works with everything from F5 load balancers to akamai to open-source proxies, I think it a technology that everybody need to get a handle on, a better way to assemble pages that scales massively.

Advertisements
22
Jun
09

Not Drowning, Waving

I spent some time with the good folks at Google Sydney and a heap of fun Australian developers exploring Googles new “wave” technology.

In short is pretty cool, an already neat GUI wrapping some serious back-end firepower to creat a collaborative environment that merges Realtime Publishing, Chat and Email. After a morning briefing on the tech, I Spent my afternoon with fellow Python lover Carlo Piva (http://www.linkedin.com/pub/carlo-piva/7/260/33b) creating a robot that objected to foul language and censored it. For those on Wave, try it by adding invectivedeleted@appspot.com to any wave (aka conversation) and just try to be rude or racist 🙂

The code to do this is short and sweet – we decided in the name of expediency to use an existing site noswearing.com for the swearing correction.

This example shows off a couple of cool things :

  1. how to make a basic bot that communicate with an external “web service” for its functionality
  2. how to do POST requests
  3. how to screen scrape the results
  4. how to update existing blips (posts)

Here is the Python me and my coding buddy came up with:

from waveapi import events
from waveapi import model
from waveapi import robot
from google.appengine.api import urlfetch
from google.appengine.ext.webapp.util import run_wsgi_app
import urllib

def OnParticipantsChanged(properties, context):
  “””Invoked when any participants have been added/removed.”””
  added = properties[‘participantsAdded’]
  for p in added:
    Notify(context)

def OnRobotAdded(properties, context):
  “””Invoked when the robot has been added.”””
  root_wavelet = context.GetRootWavelet()
  root_wavelet.CreateBlip().GetDocument().SetText(“I’m alive!”)

def Notify(context):
  root_wavelet = context.GetRootWavelet()
  root_wavelet.CreateBlip().GetDocument().SetText(“Hi everybody!”)

def OnBlip(properties, context):
  “””Invoked when the robot sees a blip”””
  blip = context.GetBlipById(properties[‘blipId’])
  contents = blip.GetDocument().GetText()
  good = unswear(contents)
  if (good!=contents):
    blip.GetDocument().SetText(good)

def unswear(bad):
  url = “
http://www.noswearing.com/index.php

  form_fields = {
    “action”: “translate”,
    “p”: bad,
    “racial”: “on”,
    “submit”: “Filter”
  }

  form_data = urllib.urlencode(form_fields)
  result = urlfetch.fetch(url=url,
    payload=form_data,
    method=urlfetch.POST,
    headers={‘Content-Type’: ‘application/x-www-form-urlencoded’})
  html = result.content
  key_start = ‘<span style=”font-family: arial; font-size:12px;”>’
  key_end = ‘</span></div><br>’
  return html[html.find(key_start)+len(key_start):html.find(key_end)]

if __name__ == ‘__main__’:
  myRobot = robot.Robot(‘invectivedeleted’,
      image_url=’http://s44.photobucket.com/albums/f39/philonikes/aim%20icons/th_fuck.gif&#8217;,
      version=’9′,
      profile_url=’http://invectivedeleted.appspot.com/&#8217;)
  myRobot.RegisterHandler(events.WAVELET_PARTICIPANTS_CHANGED, OnParticipantsChanged)
  myRobot.RegisterHandler(events.WAVELET_SELF_ADDED, OnRobotAdded)
  myRobot.RegisterHandler(events.BLIP_SUBMITTED, OnBlip)
  myRobot.Run()

Have fun!

26
Feb
09

Media 09

I covered Media09 in Sydney for Digital Media Journal. The article is here.

Highlights are the stuff about the online Obama Campaign by Ben Self, program director and founding partner of Blue State Digital.

28
Nov
08

Marque Owen on webcasting from Everest

Hear all about Marque’s adventures supporting the first ever mother/daughter climb of Everest by Nikki Bart and her mother, Cheryl Bart.

hear about everest here.

Marque and the Mountain

Marque and the Mountain

10
Nov
08

Here is my take on some recent microsoft tech announcements

I sometimes write for digital media, a journal in Australia. Here and here (pdf, page 2) you can read what I had to say about recent microsoft tech announcements.

10
Nov
08

Scott Hanselman discusses the new frameworks from Microsoft

Scott

Scott

Listen to Scott describe his role as a developer advocate at Microsoft and give his thoughts on the new web frameworks from Microsoft and others.

listen to Scott hanselman here!

17
Oct
08

The Delicate Genius and Shane discuss Silverlight

-)

The Genius 🙂

He likes it purdy

He likes it purdy

 

 

 

 

 

 

 

 

 

 

 

Kordahi and Morris from the Australian Evangelist Team at Microsoft discuss Silverlight and how it is shaping up against the Adobe Flash Monster.

Special Thanks to www.digital-media.net.au for getting me access to these fine individuals!

michael and shane