Archive for March, 2009
Reverse HTTP and the cloud
Posted on March 13, 2009

- Image via Wikipedia
I recently read the IETF draft RFC for Reverse HTTP, and it looks like a pretty simple and elegant solution to a number of problems I’ve seen, especially with the move to cloud computing.
The cloud brings with it some great possibilites but with them some great challenges. Computing on demand is great, if I need more power for a computationally intensive task I can just spin up a few instances for as long as I need them and shut them down when I’m done. Great in an ideal world, but RPC, cluster management and many tasks you’d have to take to run nodes in the cloud can be troublesome.
Apache Hadoop for example, is a great, free, opensource Map/Reduce framework but it makes assumptions based on a traditional datacenter full of real hardware that is always there view of the world. One of the biggest and most troblesome for the cloud is the fact that a master needs to be aware of the slaves before they try to connect. Implementing access controls in a secure manner for nodes connection is no small task because the whole system, from end to end is based on a custom client/server model written specifically for the task.
I’m not singling Hadoop out here, just using it as an example because it’s well known and I’m familiar with it.
Let’s take a very simple API, imagine there is no cluster, just one node. A client submits a job to the server, the server processes it and returns the result. Now let’s make it a little more complicated, let’s make it a Map/Reduce job and add a few nodes to the cluster. As far as the client is concerned the same thing is happening. They’re just submitting the jo to the server and it’s handling everything else, it breaks the job down into work units, submits them to the nodes in the cluster, all the results are merged together and passed back to the client.
In order to implement this you’re going to need at least a basic client/server API between the master and each slave. You could do it using traditional HTTP but you’d run into a scalability issue, imagine you have 10,000 nodes in your cluster. The server is going to need to have 10,000 open HTTP connections and each of them is going to have to poll the server at fixed intervals just to ask “Any work boss?”, “Nope, not at the moment. Take 5.” Sure you could increase the interval between asking, but 10,000 nodes doing nothing for 30 seconds is almost 3 1/2 days of computing power wasted.
To get around the problem you’ve got to design your architecture to push jobs to the nodes as soon as they come in. Which means writing your own client/server architecture and your own access control mechanisms amongst other things. If we flipped things around though, and the slave connected to the master over HTTP and then told the master it wanted to be the server we’ve achieved exactly what we wanted. The master knowing nothing about a slave, can now interact with the slave as if it were a client and it can submit a job as soon as it comes in.
An added benefit, the master/slave API can be the same as the user/master! After all, the master would be doing almost the exact same thing on a slave as the user is doing connecting via HTTP and submitting a job. No more custom client/server and vastly simplified code.
It would be easy to make it even more robust and allow for multiple tiers of masters and sub nodes. Just add a call to the API which asks the server how many slots it has free for jobs. Useful to a user from a management perspective, but also it would allow the master to partition the work into chunks based on the cluster size and based on the number of nodes served by any particular master. This would also be useful in terms of best use of resources given network topology issues – not all nodes are in the same rack or even datacentre.
Add to this the simplicity and power of simply adding something like HTTP AUTH-DIGEST at the server end and you’ve got ready made access controls. One certificate for clients, one for slaves. Clients can submit jobs, slaves get the work and there is no real need to know of anything about a slave before the first time it connects.
Why this is better than something like XMPP I can hear you asking. It’s not better. Not for any real reason, and yes it has some cross over in functionality with other technologies that are already out there. In the right situations though, it gives developers the option to simply things, and that’s never a bad thing.
Related articles by Zemanta
- A new HTTP header that might be useful (clubtroppo.com.au)
- Cloud platforms of the future: Hadoop and Eucalyptus (news.cnet.com)
Customer Support, a tale of three companies.
Posted on March 2, 2009
Over the last few months I’ve deal with a whole bunch of companies, as a customer. Three stand out. One awful, one iritating and one today, fantastic.
Virgin Media
Last year when we moved home we moved out of a cable area, generally being happy with Virgin Media though and not wanting to pay the early termination fee we opted to go with their ADSL service. Of course these things never go smoothly and we had to have the ADSL line already here terminated, a new account created when that happened and it was all going to take a few weeks.
So I cancelled my account, they told me I’d have to pay the termination fee, but that it would be refunded when our new account was opened. A few weeks later, more or less on time the ADSL line was connected and we were online. About a week later I get a nasty letter from the Virgin Medial collections department warning me to pay what I owe.
I rang them – not a free phone number might I add and after some time got to the bottom of it. They dropped the termination fee from their demand but I did have to pay a month that was still outstanding on the account. I paid that on the card, on the spot.
fail – Virgin really should have some sense and the ability to link my new account, old account and know that I’m just moving home and shouldn’t need to pay the early termination fee. The fact that I can cancel within the connection period just isn’t good enough, I shouldn’t be penalised for shortcomings in your systems. Also, what is up with needing me to pay the last month by card? What happened to the direct debit straight from my bank account which they used every other month? And all that’s before we get into the fact that I’m an existing customer and they’re sending me nasty letters. If the connection hadn’t been setup already we probably would have gone elsewhere, just because of that- having said that, they’re a decent ISP most of the time.
3
Last year some time I signed up with 3 for a USB data card, when I was in the store I offered a £15/month skype phone contract, which would half the cost of the data card. It seemed like a good deal and I though at the very least the skype phone might be useful (it wasn’t) so I agreed. Some time later, after the 6 month contract was over I called to cancel the phone. I was on the phone for at least 30 minutes and must have told the operator on the other end at least a dozen times that I just want to cancel the contract. I said I was happy with my existing options for a backup phone and that even at £5/month with a brand new phone, it just wasn’t worth it for me to continue; I said it again, and again. Eventually he put me on hold for 5 minutes and came back an announced my account was cancelled.
fail - The problem with someone hard selling to me when I’m trying t0 cancel the account is that I can’t just put the phone down, if I do I won’t get the account cancelled. No means no, after saying no 5 or 6 times I wasn’t likely to change my mind. If he’d looked into the account he would have seen that I hadn’t even switched the phone on in months – if he can’t see that, he should be able to.
Apple
Last week, completely different. My poor used and abused macbook needed some fixing. It’s over 2 1/2 years old and to be fair has travelled thousands of miles a bit of wear and tear is to be expected. The top case was a bit cracked, a somewhat common problem and the wire at the magsafe connector was a bir frayed . So I booked an appointment at the Genius Bar in the Trafford Centre this morning. Got in the car and drove an hour there. Since the power supply was out of warenty I could get it replaced under a repair and it would cost less than the retail part. Then he took a look, said that they’d replace the top case for free and book the power supply in under the same ticket so I’d get that free too. They said to drop back in an hour and it should be finished. So I left the machine with them and half an hour later they called to tell me it was fixed. 30 minutes, and my mac looks as good as new!
impressed – I honestly couldn’t be more impressed. I booked myself in online in a few minutes and since I had an appointment I was served as soon as I got in the store. It took the Genius behind the bar a few minutes to asses the problems and book the machine in. 30 minutes later they had it fixed.
Related articles by Zemanta
- O2 tops broadband satisfaction lists (vnunet.com)
- Bitter experience with yatra.com (computerknowledge1.blogspot.com)
- Top 10 Reasons Why Your Customers are Being Difficult (conversationagent.com)
- Broadband: 25pc of users face extra charges (telegraph.co.uk)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_c.png?x-id=93eacfca-1806-4aaf-b765-378d607b650a)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_c.png?x-id=50f8c68e-d073-49ea-b78c-8f98caac5d1c)