What if a SaaS You Depend on Dies?

7
Dec/08
2

Sitepoint just published an article about the Perils of Software as a Service. They basically just said “in an economic downturn, companies will start axing their free services, and if you depend on their free services, that might have a big impact on you and your business model”. Then they offered three pieces of advice for mitigating these risks:

  1. Prefer in-house servers for mission-critical applications.
  2. Prefer portable data.
  3. Prefer backed-up services.

Yep, that’s a great list… but there are some issues:

  1. In-house servers require in-house experts, and those cost money. If the economic downturn is the problem, you probably have less money, too. Further, if you’re a start-up, doing stuff in-house may increase your time-to-market, which means you’ll be eating away more of your cash reserves faster.
  2. They argue that using Google Documents could be a bad thing, because Google could decide it’s not worth developing further, and then your stuff is stuck in their service. Well, yeah, except that a) you can export to Microsoft Word & PDF format; and b) Microsoft Word uses a proprietary non-portable format in its own right. The fact that it has majority marketshare is what makes people feel safe about it.
  3. You should *always* only use backed-up services, not just in times of crisis. Never trust your data to people who don’t do back-ups. AND if you store your data somewhere ‘else’, you should always take the time to write a bit of code that will retrieve a copy for you ‘on-demand’. Hear they’re going down? Hit the Big Red Button. Even if you just store it in a big compressed archive for now, at least you still have it!

So, those are a few short rebuttals, but I think they missed a key strategy altogether:

  • Implement abstraction layers

The best way to reduce the risk of losing access to a service is to write your code in such a way that it doesn’t know where the data lives.

  1. Prefer names that refer to the type of data being handled, not the source of the data.
    Example: Location->getLatitude() is better than Gmap->getGlat()
    You can still use Gmaps, of course, but use them inside a Location wrapper so you can swap it out for Yahoo Maps, or (god forbid) MapQuest Maps if need be.
  2. Prefer accessing & manipulating data through getters & setters, not directly.
    Example: echo $person->getFullName() beats echo $person->first_name.$person->last_name;
    Directly accessing the properties assumes they’re stored locally, when they could just as easily be living out on a web-service. Also, if you use a getter and your data provider decided to re-name the “last_name” property to “sur_name”, you only have to make the change once, in the getter, instead of throughout your code.
  3. Prefer libraries that abstract away dependencies
    Example: The type of SQL you write changes depending on the type of SQL Server you’re using (MS-SQL Server, MySQL, DB2, Oracle, etc). Propel is a PHP ORM that removes SQL from your daily life as a developer. It replaces SQL with Criterion objects. To get a list of users with last name Jenkins, you do:
    $c = new Criterion();
    $c->add(UserPeer::last_name, ‘Jenkins’);
    $users = UserPeer::doSelect($c);

    Now if you need to switch from MS-SQL to MySQL to save money, it’s no problem. You just tell Propel you’re now using MySQL, and you don’t have to change your code. Can’t wait till ORMs start supporting Google’s “BigTable“, and Amazon’s “SimpleDB“.
    You could even abstract it a bit more, and have a UserManager object which wraps your data-access-layer of choice. Your new code would simply be:
    $users = UserManager::getUsersByLastName(’Jenkins’);

All of these solutions require that you sit down and think about what you’re going to do before you do it. That is, they require a Design Phase. Don’t knock it ’till you’ve tried it ;)

That’s all I can think of right now. It’s still before 8am, so don’t expect too much from me. Anyway, if you have more ideas, I’d love to hear them in the comments :)

Comments (1) Trackbacks (1)
  1. Joshua Briley
    9:37 am on December 7th, 2008

    Derek,

    This is very interesting. I followed you here from the Sitepoint blog about the reliance on SaaS apps. Google Apps is my main concern… email backup, primarily.

    Like you mention, Google Docs is exportable, though it’d be a big pain in the “you know what” to do so with a lot of documents (unless I’m missing something). This is precisely why we use Docs only for collaboration.

Leave a comment

Pretty Clouds

4
Dec/08
3

When I was at I Love Rewards we need to keep costs low, but we also needed scalability. When we re-wrote our enterprise platform, our Director of I.T. at the time (Amin Lalji) got us in on the beta of Amazon’s EC2 (Elastic Compute Cloud). We were one of the first people to run a cluster on it, which was pretty cool. You pay per CPU-hour. Unfortunately, we later determined that running a cluster for 10 concurrent users didn’t make much sense. Fortunately, we had spent some time architecting things to be abstract & swappable, so scaling back to a single box was easy. When I left, traffic was getting high enough that we were about to upgrade to two servers (1 for the database, and one for the application). I’m sure that has been easy for them, and that it’ll be easy to scale back up to a cluster when the time comes.

We also stored all of our images on Amazon’s S3 (Simple Storage Service). As much as possible lived in the Cloud.

At my new job, we ain’t got no clouds… but we’re about to. This time, however, it won’t be Amazon. It looks like we’ll using Nirvanix. Unlike Amazon, they have a nice Zend_Framework_Nirvanix class for accessing their web services. Why go with them and not S3? The big reason is that on top of simply offering storage, they offer some VERY handy multimedia services. Specifically, they do image resizing, video transcoding from one format to another, and video frame extraction. Pretty hot stuff. Their pricing is good, too. You pay a certain rate to store data on their network, and either $1/GB pay-as-you-go, or $0.20/GB to have all your content transcoded & frame-extracted! Nice :) I’m looking forward to playing with it!

What can Nirvanix’ services do for you? (no, I’m not getting paid for this)

Comments (3) Trackbacks (0)
  1. Tom Bassett
    10:56 am on December 5th, 2008

    At a high level, you are correct on Nirvanix vs Amazon S3. But before you marry them, ask them about their availability, if they have ever met their own SLA, and if they’ve lost 8,000 customer files recently (as in gone). Good Luck.

  2. Derek
    11:38 am on December 5th, 2008

    Oh man, Tom… sounds like you got burned pretty bad. I hope that’s not the cast…

    Indeed, I have been burned by personal data loss before, and I guess I should really look into their back-up strategy (non-existent?), or implementing our own.

    Maybe we can upload to Nirvanix, and transcode there, but then transfer it to S3 for long-term storage & public delivery.

    Also, Tom, the email address you used for this comment is now “undeliverable”. Remote host said: 554 delivery error: dd This user doesn’t have a yahoo.com account (your_email_here@yahoo.com) [-5] – mta160.mail.ac4.yahoo.com [BODY]

  3. Zakir
    7:45 am on December 6th, 2008

    You’re right, we have split the application and db into two servers… and yes, it was really easy.

    If you’re looking for other cheep grid hosting solutions, Slicehost (recently acquired by Rackspace) is awesome..

    http://www.slicehost.com/

    I’ll be using them for my personal projects.

Leave a comment

No trackbacks yet.

Comments (3) Trackbacks (0)
  1. Tom Bassett
    10:56 am on December 5th, 2008

    At a high level, you are correct on Nirvanix vs Amazon S3. But before you marry them, ask them about their availability, if they have ever met their own SLA, and if they’ve lost 8,000 customer files recently (as in gone). Good Luck.

  2. Derek
    11:38 am on December 5th, 2008

    Oh man, Tom… sounds like you got burned pretty bad. I hope that’s not the cast…

    Indeed, I have been burned by personal data loss before, and I guess I should really look into their back-up strategy (non-existent?), or implementing our own.

    Maybe we can upload to Nirvanix, and transcode there, but then transfer it to S3 for long-term storage & public delivery.

    Also, Tom, the email address you used for this comment is now “undeliverable”. Remote host said: 554 delivery error: dd This user doesn’t have a yahoo.com account (your_email_here@yahoo.com) [-5] – mta160.mail.ac4.yahoo.com [BODY]

  3. Zakir
    7:45 am on December 6th, 2008

    You’re right, we have split the application and db into two servers… and yes, it was really easy.

    If you’re looking for other cheep grid hosting solutions, Slicehost (recently acquired by Rackspace) is awesome..

    http://www.slicehost.com/

    I’ll be using them for my personal projects.

Leave a comment

No trackbacks yet.

LifePipe

22
Nov/08
1

omg
i just made a frickin’ sweet pipe!
i call it my “lifepipe”
it shows you my digital life in from most recent to oldest…
my facebook statuses
my twitter tweets
my flickr uploads
my last.fm scrobbles
my personal blog posts
my geek/coding blog posts
and my recently favourited youtube videos
subscribe to my life by clicking here

http://pipes.yahoo.com/pipes/pipe.run?_id=_LI6Afm43RGj03lRPxJ3AQ&_render=rss

Comments (1) Trackbacks (0)
  1. Hidden Gem films
    12:53 pm on October 25th, 2009

    Sounds good. Not familiar with this program but I am going to try to make one too. Have been looking for something like this.

Leave a comment

No trackbacks yet.

Comments (1) Trackbacks (0)
  1. Hidden Gem films
    12:53 pm on October 25th, 2009

    Sounds good. Not familiar with this program but I am going to try to make one too. Have been looking for something like this.

Leave a comment

No trackbacks yet.

I’m Smokin’ Pipes

20
Nov/08
0

Have you played with yahoo pipes yet?
I kept meaning to, but never did… until tonight.
Pipes. Are. Awesome.

My first ever pipe took me an hour to build (learning curve included)
This is what it does…

  • aggregate 35 English language feeds
  • aggregate a few Russian feeds AND translate them into English
  • create a super-feed out of the union of the English and (previously) Russian feeds
  • filter out all the feed items that don’t match my ‘wanted’ keywords (having to do with UFO sightings, the paranormal, etc)
  • filter out all the feed items that DO match my ‘unwanted’ keywords (such as ‘illegal alien’, and ‘hoax’)
  • sort the feed items by publication date descending
  • remove duplicates based on the item’s link URL
  • extract keywords from each item’s description, and append them to each item as an extra “keywords” attribute
  • extract location information from each item’s content (mentions of cities, etc), translate it into latitudes & longitudes, and append them to each item as an extra “location” attribute
  • publish it as a native-PHP array, for easy consumption by file_get_contents($url)
  • Note: My pipe is automatically also available as RSS, JSON, & KML

I’m not even kidding.
One Hour.
It’s insane.

There’s one little bug in it somewhere, having to do with ATOM feeds not having an item.description, but it still works. In fact, you can see it working here:

Let me know what you think in the comments on this blog post!

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes