Amazon EC2 for Facebook – Upgrading to PHP 5.2

Okay, so we started looking into using EC2 to power Facebook applications. Now, EC2 is not your garden variety virtual hosts. You get a reasonable amount of RAM and processor power, but that means you are not paying $6 a month any more.

The basic system types are

Small Instance (default)*

    1.7 GB memory
    1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit)
    160 GB instance storage (150 GB plus 10 GB root partition)
    32-bit platform
    I/O Performance: Moderate
    Price: $0.10 per instance hour

Large Instance

    7.5 GB memory
    4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each)
    850 GB instance storage (2 x 420 GB plus 10 GB root partition)
    64-bit platform
    I/O Performance: High
    Price: $0.40 per instance hour

Extra Large Instance

    15 GB memory
    8 EC2 Compute Units (4 virtual cores with 2 EC2 Compute Units each)
    1,690 GB instance storage (4 x 420 GB plus 10 GB root partition)
    64-bit platform
    I/O Performance: High
    Price: $0.80 per instance hour

So, if you get your calculator out, 10c an hour is $72 a month before you add in bandwidth and additional storage for your customized AMI.

Anyway, the initial set up all went very smoothly using the EC2 getting started guide.

After I connected to the instance, first the housekeeping

yum update

Next, I needed PHP 5.2.x rather than the default 5.0.4 – Something to do with SimpleXMLElement in case anyone is interested

If you just need PHP to work with JSON, use

 yum install php-json

If you need PHP 5.2, here’s the steps

cd /etc/yum.repos.d
yum --enablerepo=remi update mysql
yum --enablerepo=remi update php
apachectl restart

Hope this saves someone some time.

Where have I been?

Okay, for all you non-readers out there, I need to explain myself for continuity. I read the TOS on FaceBook a little closer, and the visage project is probably on hold as a FaceBook application as it violates the terms a little (Alright, a lot). That is not to say that ot will no re-appear just as a browser plugin one day (But probably only for FireFox).

So what’s been consuming my time?  We got busy at Grouptivity and now have FireFox and IE plugins, webmaster scripts, WordPress and Movable type plugins, a Flash widget and a mobile version (Not all released yet). But, mostly I’ve been spending time on a music video blog at and a couple of FaceBook apps for blogs to get over the video limits.

We (well me) are also looking at posting to twitter as really it is just another syndication piece. My unfinished work is at [Link retired] but the cool version will be done through Grouptivity

As well as being on Facebook, twitter I an also now on LinkedIn

I showed my face at the SF Beta 2.3 event, and the details will be on tomorrow’s MusicBlogTelevision posting.

Why do Microsoft make it so tricky

Okay I have a nice FireFox extension that detects the FaceBook page and does what I want it to. So using that I created a nice little script that I can add as a menu item in Internet Explorer – When I trigger it it does exactly what I want it to – cool!

So now all I want is for that to happen automatically – This iswhen the rabbit hole opens up and I go spinning down through BHOs (Browser Helper Objects) C++ and ATL. To add another acronym WTF?

I have no idea why that 1 extra step becomes so difficult and to make it even worse you should try creating something using ATL without having MSVCC (I’m trying mingw).

Techno rant over. Maybe I’ll look at Safari before IE 

All quiet on every front

I have slowed down a little for a couple of reasons

1. Lack of sleep was not “making Jack a dull boy” it was making me an irritable boy. Anyway, a bit of sleep helps and the release of OpenSocial made me think that this can be taken to more platforms

2. Completeness – If I do this , the templates offered, even for testing, need to be good and complete. So, that means I need to spend a little more time on getting the 2 prototype templates completed and also be on the way to having at least 20 ready for beta

Moving past that, I need to be ready to present the templates via something like gallery and also have better interaction within facebook to announce user template updates. Finally, a good demo vid, nice screenshots and at least $800 to convert to an LLC and cover taxes. Also, need more info on the profile box.

So, nitty gritty time and that is why it is quiet. But…. the  “black” tempalte is beginning to lok nce…

Monetizing facebook – Ha!

Of course we’d all love to have an addictive app. where the user constantly returns to the canvas page (Where FB developers can show ads)

 BUT although you can show google adsense ads they will not work contextually as you can only show them in an iframe – jeez.

So, I am showing google ppa (Pay per action) ads, a paypal donate and the unfocused adsense ads – there has to be abetter way.

 Anyway, as I can apply this to other networks, the ads may prove to be okay.

Failing that, I need to come up with a way to charge for premium templates.

With what shall we build it?

Whenever you set out to do something, you need to have a good idea of what the impact could be. In this case, the first property that the system is going to interact with is FaceBook. Sacry as that proposition is, most apps get such little traffic that it’s not going to cause you any pain BUT you don’t want to run the risk.

I decided to pull on the pieces that I have used reliably in other roles.

Hosting It starts with Media Temple and their grid server. That should get you out of the door unless your app is seriously heavy (Mine isn’t)

Blog You have to blog while you get your ducks in a row – proof of concept, video of it in action, ad account and then alpha version. Only one choice WordPress (You could go blogger if you haven’t got your hosting set up)

WebSite I went with Joomla, but any CMS that can preserve your content, offers user registration etc. is good. The learning curve can be a little steep if you are not used to it and you could just leverage your blog platform for a basic site in the interim.

Ad partner You have to love Google adsense for this. You’ll find it is hard to secure a quality network while you have low volumes.

Content Delivery Network If you are serving a lot of static content, you can lift the hit off your server and spread it around the CDNs servers which should give a performance boost to your users, save your server and save bandwidth fees as the CDN fees should be cheaper than your host. Also, go this route or with a torrent if you have a download. I am looking at PantherExpress although I understand that Limelight offer something similar 

DNS provider – I use a DNS provider, although you can leverage the DNS provided via your registrar or hosting company. Having a separate DNS provider can allow you to round robin between providers and can be useful for redundany or transition. I use EasyDNS – I originally picked them when I needed a provider where I could set up a TXT record for SPF (Sender Policy Framework) which is to do with email delivery. They can  also act as a secondary mail server for you so that if your primary is unavailable they will catch the mail for you until your primary is back up.

Once you have all this you can finally get back to your application, which is what I will do now.

Next: Proof of concept screenshots and video…

What’s in a name?

Names, names, names – so hard to come up with and rendered meaningless by the number of domain squatters. Anyway, this one does have some meaning if you scratch the surface a little….

There is a problem I wanted to solve, and it involves application side work and client side work – Essentially a pincer or 2 pronged approach (get it). Anyway, while not necessarilly accurate at least the domain name was available, so here we go….