v6 MSN Adcenter for PHP

Mike Taggart of Envoy Media Group and I have collaborated on a new little project to build an easy to use PHP library for MSN AdCenter (v6). Handles Ads, AdGroups, Campaigns and Keywords, here.

Mish(S?)Mash

MishMashSMash is my ambitious new OSS opensocial container for housing individuals own personal, arbitrary and portable online datastores, where they can build personal or social data feeds amongst ‘friends’ with a finer grain of access control than is generally offered by seed funded social networks. Think Yahoo! Pipes, but for ‘local’ feeds you create yourself (like your record collection, favourite OMGLOLCatzHAHAOHDAD! or whatever), or with friends (a collection of my mates french jungle records circa 2003-2005 who live in Brisbane). Clear as mud?

The project has just been started and is available on github here (feel free to fork), with an ongoing developer blog here relating to opensocial standards, LOD/RDF(s) + semantic web, online privacy, interoperability, the irony of building a possibly monetising system to avoid vendor lockin and every one of my tedious technical discoveries. It’d be nice if this talked building AR/Layar services as well.

Tech is PHP/CodeIgniter for a quick backend prototype + some serious client side behaviour using Mootools + Gears (offline mode) + Cassandra cluster for elasticity with *minimal* server-side application logic. So much to chew! lucky these meats are truly delicious.

HipHop PHP, the day has arrived

HipHop PHP has been a rumored Facebook project for a few months now, finally it’s arrived.

“HipHop transforms your PHP source code into highly optimized C++ and then compiles it with g++ to build binary files. You keep coding in simpler PHP, then HipHop executes your source code in a semantically equivalent manner and sacrifices some rarely used features – such as eval() – in exchange for improved performance.” (more info, repo).

It looks neat (in a Google GWT kind of way), keen to see how it plays with opcode caches, xdebug, shared memory stuff etc. and whether it makes pcntl_fork() actually useful (no eval(); so chances are slim). Facebook has very different requirements to the rest of us and an already highly optimised code base, so HipHop may be filling a very specific niche. Hopefully developers won’t use it as a bandaid to actual performance profiling, or expect it to solve their I/O issues. fingers crossed :p

Cassandra 0.5.0 released

After much work behind the scenes, Cassandra 0.5.0 has made it out of RC and into release, representing significant performance, API and bootstrapping improvements across the board.

XE currency feed imports w/PostgreSQL

This table and trigger will facilitate periodic currency updates (ie: race condition free) from XE feeds for a single base currency. In this case, USD.

CREATE TABLE currency_feed
(
  currency character(3) NOT NULL,
  country character varying NOT NULL,
  from_usd double precision NOT NULL,
  to_usd double precision NOT NULL,
  CONSTRAINT currency_feed_pkey PRIMARY KEY (currency)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE currency_feed OWNER TO postgres;

-- this trigger replicates the 'on duplicate key update' mysql directive
CREATE FUNCTION repl_currency() RETURNS trigger AS $BODY$
BEGIN
  IF (EXISTS(SELECT 1 FROM "currency_feed" C WHERE C."currency" = NEW."currency")) THEN
    UPDATE "currency_feed" SET "from_usd" = NEW."from_usd", "to_usd" = NEW."to_usd" WHERE "currency" = NEW."currency";
    RETURN OLD;
  ELSE
    RETURN NEW;
  END IF;
END;
$BODY$ LANGUAGE plpgsql;

ALTER FUNCTION repl_currency() OWNER TO postgres;
CREATE TRIGGER repl_currency BEFORE INSERT ON "currency_feed" FOR EACH ROW EXECUTE PROCEDURE repl_currency();

Periodic import is then just :

set client_encoding to 'ISO-8859-1';
copy currency_feed from '/path/to/feed.csv' delimiter ',' csv quote as '"';

… fast falling in love with Postgres ;)

Weelya releases Ajax Push Engine 1.0

Weelya, an interesting realtime web startup from France, has released version 1.0 of it’s Ajax Push Engine (APE). press release here. Currently chats back to APE server over its own protocol, with WebSocket and lovely HTML5 server-sent events support not too far away – keep an eye on this one. :)

In other news, Chromium Websockets support is go!!.

Finally, it looks like comet/long polling/nph hacks will be kicked to the curb and not a moment too soon – 2010 is setting up to be a paradigm shift year. yay.

Form Validation with PHP + jQuery

Form validation tutorials – done to death right? As a player for Team Redundancy, I’ve built one for the Pandra library (PandraValidator class) which performs server side validation with the help of jQuery. Both client and server side uses the same validation function, and the good thing is – it’s really fast. It ticks a few security boxes also (referrer checking, a honeypot field, POST timer, GET > POST method enforce) and may be a good conceptual guide for building your own.

Source is here, enjoy.

IREX 2K9 award winners

ISOBOT GOT KUNG FU POSES, BIATCHES! It can also speak, I wonder if it can say…. ‘I love you’. (awwwwwww)
You need to a flashplayer enabled browser to view this YouTube video

Slugabed: Dummy 16 Mix

Not only is Slugabed an A++ class producer, he gets his mixes tight and right. Mind bendingly creamy, delicious next level bizniss. wwwoooonnnnkkk. Grab it here

Pharoahe Monch – Simon Says (Slugabed Remix)
EPROM – Shoplifter
Nasty Nasty – No Names
Low Limit – Trapperkeeper
Lokid – Kick The K
Akira Kiteshi – Pinball
Zomby – Strange Fruit
Dyno – Sosismas
Slugabed – Titans
Slugabed – Take OFF
Busta Rhymes – Everybody Rise
Cupp Cave – Breech This Trust
Mark Pritchard – Wind It Up
Scuba – Twicth (Jamie Vexd Remix)
Rustie – Response
Rustie – Bad Science
Nasty Nasty – Necking
Kingfisherg – Rubicon
Machine Drum Ft. Melo – Let It (Lazer Sword Remix)
Loops Haunt – Impact Omnihammer
Boss Kite – ??
Dyno – Fuh Real Inst.
Last Poets – Long Enough
Slugabed – The System
Slugabed – Beer
Rabbi Bananas – Cat_Eat
Slugabed – Ultra Heat Treated
Nasty Nasty – This Kills
EPROM – Humanoid
AK Kids – A Soft Touch
AK Kids – Donk
Powell – Toyz Like Soup
?? – ??

Kanjilish is making my brain explode slightly less

In love with Kanjilish atm, a Firefox extension that transliterates what it can from English into an appropriate Kanji form. hrm, if only it could translate Romajji instead it would be the perfect tool for mastering the Onyomi vs Kunyomi readings as well. Still – this is GOOOOOD. げんき! げんき!