Archive for the ‘Other’ Category
Autonomy, Mastery, Purpose
Saturday, May 29th, 2010Twisted Web IMPS Echo Client
Tuesday, January 13th, 2009Having a twisted environment, I have been able to write a simple web resource handler. I like twisted, although the documentation is pretty weak, so you have to go down to read the code rather frequently if you want to know how to do things.
My first task was to handle an XML post for IMPS CSP. I thought I would skip the wbxml version to start with.
So first thing was to setup the test client. Just for now, I used curl to post the data:
curl http://localhost:8080/ -d @login-success.in.txt
Where login-success.in.txt is the first message the phone sends in:
<?xml version="1.0"?>
<!DOCTYPE WV-CSP-Message PUBLIC "-//OMA//DTD WV-CSP 1.2//EN" "http://www.openmobilealliance.org/DTD/WV-CSP.DTD">
<WV-CSP-Message xmlns="http://www.wireless-village.org/CSP1.1">
<Session>
<SessionDescriptor>
<SessionType>Outband</SessionType>
</SessionDescriptor>
<Transaction>
<TransactionDescriptor>
<TransactionMode>Request</TransactionMode>
<TransactionID>nok1</TransactionID>
</TransactionDescriptor>
<TransactionContent xmlns="http://www.wireless-village.org/TRC1.1">
<Login-Request>
<UserID>hermes.onesoup</UserID>
<ClientID>
<URL>WV:IMPEC01$00001@NOK.S60</URL>
</ClientID>
<Password>xxxxxxx</Password>
<TimeToLive>86400</TimeToLive>
<SessionCookie>wv:nokia.1789505498</SessionCookie>
</Login-Request>
</TransactionContent>
</Transaction>
</Session>
</WV-CSP-Message>
The payload is contained within the POST data, but there are not arguments on it (no a=x). So I needed to get the raw content. To achieve that, I created a hello.py file which would contain my Hello resource handler:
from twisted.web.resource import Resource
class Hello(Resource):
allowedMethods = ('POST',)
def render_POST(self, request):
request.content.seek(0, 0)
data = request.content.read()
return data
As we can see, all this does is to send the payload in the HTTP POST request back to the client. To get this running on twisted, we write an index.rpy and save it in /Users/brunofr/Sites (adjust):
from imps.csp import hello
# comment the next line in production
reload(hello)
resource = hello.Hello()
A couple of comments about this code:
- I put the code within the
imps.cspmodule. - I call
reloadto allow me to edit the module during development.
And bang, we run it:
twisted -n web --path=/Users/brunofr/Sites
Point your browser to http://localhost:8080/. It does not work, since we are not accepting the ‘GET’ method. But if you use curl:
curl http://localhost:8080/ -d @login-success.in.txt
it works, as it should.
Why Video-On-Demand Streaming in Airlines Sucks
Tuesday, August 19th, 2008It’s rare to take a flight from British Airways or Virgin Atlantic where the Video-On-Demand system just works. It might be a problem only with UK airlines, but I presume this is a general issue across aviation.
Sometimes you are part of the folks in the plane for whom the system does not work. The crew will normally start rebooting your seat, then the section, and then the whole plane. I guess they do so in hopes that the operating system running the streaming adheres to the same random rules as the one running on their desktop.
In case of an incident with the entertainment system, i.e. in every single flight, the crew keeps apologizing about not being able to fix the problem and continue performing reboots left and right. Reboots are seldom able to address the problem, and the only thing reboots achieve is general frustration, both from those without video, but mostly from those with video who see their programs shut down. Eventually, the crew settles down to multicasting a few movies.
Virgin Atlantic even has the courage to advertise Virgin Media Broadband and TV packages on a commercial playing before the movie. Enjoy this cool entertainment system (that does not work) at home just like you do in the plane. I am no marketing guru, but that sounds to me like a dumb ass campaign.
I’ve seen a few times a linux boot-up sequence on Virgin, and I’d be surprised if BA was not also using Linux. Most likely, they are both using VideoLAN against one or multiple streaming servers with network attached storage. For whatever reason, it’s the connectivity that fails, and the individual Linux workstations that fail to connect to the streaming server, or for the streaming server to be able to read the files from storage.
The reason to use attached storage is two-fold: cheaper, reliable and easier to update. But, guess what, wired networks don’t seem to be reliable on a plane (probably because of the high-frequency power lines). So here’s my advice folks: avoid the network (single point of failure). Here’s how.
Virgin Atlantic has around 100 movies on inventory, plus TV series, CDs and radio programs. I’d bet their total inventory at any given point in time is between 250Gb and 500Gb. Maybe the solution to use shared storage made sense years ago cost-wise, but today the cost per Gb has fallen so much that internal disk storage could make more sense. Specially since there are no availability requirements (if it fails, a simple swap fixes the issue).
They could get a 1Tb disk per seat and image (push on the ground) all disks with the OS, the video player plus and the full media library. Re-imaging will take a few hours, but the inventory only gets fully updated every 2 to 3 months. Every seat would become an autonomous and reliable processing unit with its own storage. And in case of failure, it would only cost $100 to swap disk and reboot one seat, something the crew could do in-flight. No apologies, no pissed off customers, no compensation.
So, guys, go and implement it, so that I don’t have to watch the beginning of The Oxford Murders from Alex de la Iglesia three times on my next flight.
Andrea Ayuso Morillo, Au Pair Vanished in Thin Air
Thursday, February 21st, 2008We got a new au pair in January from Spain, Andrea Ayuso Morillo, for our daughter. Our previous au pair had been Finnish, and Anaïs did learn pretty good language skills from her. We now wanted a Spanish girl to take care of our daughter Anaïs, to ensure her Spanish would improve. We found Andrea on a specialized site, au-pair world, and after a few calls and email exchanges she seemed like a really nice girl.
She came to the UK, and she seemed reliable and hard working. She was also imposing a bit of more authority in Anaïs, I guess a good thing too. We thought she was happy. But obviously we were wrong.
We spent last weekend in Finland, and returned on Sunday night. Andrea had disappeared. Her room was empty, all her belongings gone. And only one note to tell us that she was quitting. No notice, no discussion. No nothing.
She has now fully removed any traces. She has removed my wife as a connection from gmail. She has removed her profile from the au pair world where we first found her, and now we know that she posted an update in January looking for a new place in London. And she also posted her profile on another couple of sites. Yes, we know, Andrea. Even if you removed it, you cannot change the past. That’s what the search engines cache is for.
So here is the thing, Andrea, you might be the best child caretaker in the world. You might be the best in social services. You might be friendly and good at your job. But you are not trust worthy. And trust, with a child, is the most important thing.
Andrea, nobody will trust you unless you grow up and find ways to discuss and communicate, to negotiate. You won’t get far by being a coward, hiding away without daring to confront people. And yes, we are angry. Had you told us you were leaving, we would have understood, and planned for it. End of the story. All we needed was notice. You were paid for a week, and left half way through, and without notice. Besides this constituting a breach of contract, you behaved like a teenager. Shame on you, our daughter is more mature than you, being 27!
So why I am posting this? Firstly because you, Andrea, need to become accountable for your actions. You see, I just need to post this and let the search bots crawl my site, something that happens several times a day. And within a few days, this posting will be showing on the search results pages for Yahoo! and Google when people look for your name. Even a few years later, this post will still exist, and folks looking for references will find it.
Secondly, because I hope that by reading this other parents may not follow our own fate. If you are a parent reading this and Andrea is taking care of your children, take a minute or two to reflect about our story. Because it could happen to you too. One day, you wake up, and Andrea is gone, leaving you and your child in a really difficult situation.
Update (2008-03-02): It seems like Andrea’s experience has improved dramatically since she left us a few weeks ago – she’s gone from looking for au pair positions to aspiring to become a nanny.
Being Phileas Fogg, Day 5
Saturday, September 8th, 2007The flight to Singapore left close to midnight, and I had to go through only 6 security checks, one person checking after another that the previous one had done their job. It’s always surprising to me to see how in India things are not necessarily always done in the most efficient ways. But then again, it is in fact and optimal utility point, since given the low cost of labour there is no incentive for being efficient in manual processes.
The flights with Singapore Airlines were fine, although the plane between Bangalore and Singapore was much older and rather run down than the one between Singapore and Seoul. The service however in both of them was exceptional. Singapore Airlines is always an amazing experience.
I did watch the last movie of the Pirates of the Caribbean, whatever is called, since I did not manage to sleep, at all. As we landed in Seoul, I saw an unbranded Airbus A380 in Seoul/Incheon being taxied. That plane, a double decker, is simply huge. I wonder what it was doing there, and where it was going to. It looked like a promotional plane for Airbus perhaps going or coming from some event or show.
The taxi was waiting for me, unlike in Bangalore, and it took us a bit over an hour to get the the Grand Intercontinental. It’s a suberb hotel. Highly recommended, and example of the elegance and fine, delicate treatment of Asia.
It was my first time in Korea, and I was definitely impressed. Pity that everything is so expensive. I can see Korea might having trouble, alike Japan, to compete with China.
Being Phileas Fogg, Day 4
Saturday, September 8th, 2007While talking this morning to the cab driver taking me to our EGL office in Bangalore, when for some unknown reason, the driver told me that his boss was paying him 3,400 rupees per month, and that after 22 years of service. That actually got me thinking..
The taxi company appointed by the hotel is paying a monthly contract fee of 60,000 rupees to the hotel. There are 30 drivers on contract. Each driver makes 3 to 4 trips a day, each bringing in 400 to 800 in sales. I’ll let you do the numbers, but even considering extremely expensive car leases, gasoline, insurance, etc. you’ll find out that this taxi business runs easily at close to 90% margins.
And apparently this is not unusual in India. The differences between the poor and the rich are huge. Whereas a taxi driver makes only 3,400 a month, a hotel general manager makes close to 100,000 rupees. Take into account that the taxi driver is not among the poorest in India, and you have right here an example of the remaining of casts in modern India.
But getting back to technology, I gave a TechTalk to the Indian office regarding architecture. I used the “seek vs transfer” example to show how we, as technologists, must sometimes solve technology problems that are strategic in nature and that the business is not necessarily going to think about, not to talk about spontaneously sponsoring. It is an architects job to identify these gaps, and ensure that long-term investment in technology is done.
The seek vs transfer problem and the work we are doing with Hadoop is just one example, but one that I find highly illustrating, and that most engineers associate easily once I walk them through Ebay’s publicly known strategy for databases, removing transactions, order, joins, foreign keys … to the point that Ebay even challenged whether a relational store was still useful for them.
Being Phileas Fogg, Day 3
Saturday, September 8th, 2007I was reading today during breakfast the Economic Times of India when I came across a really interesting interview with the CEO of Airtel India, Mr. Sunil Bharti Mittal. He was making the point that given the development cycle in which India is in mobile is as important as broadband. According to the CEO of Airtel, consumers expect in India expect a seamless experience from broadband to mobile, and from mobile to TV.
When we funded Meridea back in 2001, we commissioned a research survey among CEO/CIOs to understand their likelihood of mobile booming as the channel of choice for financial services. And back in 2001, the answer was a resounding yes. However since then, mobile has not really picked up due to a number of reasons going from device limitations, network limitations, bandwidth costs, and security issues. The end result was that Meridea struggled to sell in a market when only broadband was important. The key value-added of the software were its multi-channel features, but the market did not want to think multi-channel.
However, if Mr. Mittal would be right, and I believe he might, especially given the low penetration of copper infrastructure in Emerging Markets, a multi-channel solution like Meridea definitely makes sense to address both content distribution and interactive services.
The fact that TV is listed on the list make me wonder though, since good TV infrastructure with interactive features depends again on copper or fiber, not available generally in most Emerging Markets. So perhaps Airtel is thinking about adding mobile devices to TV sets? Now, that would be interesting.
After finishing breakfast, I got into a cab, and started heading down to the office in MGR. It’s an older building than EGL, and the age tells internally. The Yahoo premises are quite well-maintained anyway. Funny enough they have the same elevator problems as we do in London.
I did take a look at several projects, one of them being OurCity, which is beautifully minimalistic. If you have not had a chance yet, take a look at OurCity. OurCity works with the notion of modules, and a module repository. A module is a composition of a view and a data source, which will normally be a parametrized service call. You create modules and add them to a slot in a layout, which itself you can manage. Simple, elegant and efficient, it allows Yahoo! to quickly create local presence without major editorial costs.
For dinner I went with the team to a local Indian restaurant “apt” for foreigners. Really nice place in MGR, and great company. Believe or not, we actually spent most of our dinner discussing about architecture and design, the value of standards, technology strategy, etc.
Being Phileas Fogg, Day 2
Saturday, September 8th, 2007After a peaceful flight, and a short sleep, we landed at 4.30AM in Bangalore. Getting through immigration in Indian airports is always a unique experience, but this I time I really flew throw passport control and customs, especially since I only had carry on luggage. Note to self: never check-in luggage.
The problem was outside. My driver from Le Méridean was not there. There was another driver from the hotel waiting, but for another guest. I had to wait. And after more than 10 hours on a plane, with little sleep, I was wondering why I had to wait for my driver. Anyway, after a few calls, he did finally show up, claiming he had had trouble parking. I mean, how difficult is it parking at 4.30AM in an almost empty car park? No tip.
On the way to the hotel I noticed how different Bangalore is from New Delhi. Whereas New Delhi is all upside down, full of works, cows, and messy as hell, Bangalore is relative tidy and developed. Even the thousands of trucks cruising during the night in New Delhi, since they are limited during the day, were not present in Bangalore.
I managed to catch an hour of sleep until going into the office. The hotel is alright, but I would not recommend it. You really don’t get much for your money, and there are better options in Bangalore, which actually happen to be closer to both Yahoo! offices in MGR and EGL. As much as I normally like both Le Méridean and Sheratons, this one simply does not cut it. The rooms were not very clean, some light bulbs were blown off, and you can smell the kitchen from the rooms. Also the shower-in-bath does not cut it, with barely any pressure and water getting all over the place.
The day at the EGL office was really good and productive. It’s always inspiring to meet the teams, and this time was no different. The facilities are also really good. It feels like being back in Sunnyvale.
On the way back I stopped by the State Cottage Emporium in MG Road, an (allegedly) safe place to shop for foreigners, with marked prices. Well, after bargaining a 25% discount on a traditional necklace, and walking out proudly, I feel strange at such a discount, and I am not sure whether I have been an artist of negotiation, or really, really, stupid.
Being Phileas Fogg, Day 1
Sunday, September 2nd, 2007Yes, you are right, not Malkovich, but Phileas Fogg. At exactly 10.30am sharp today, I popped into a taxi that took me to Heathrow Terminal 4. I am currently writing from the BA Business Lounge waiting for my plane and ahead of my tour “Around the World in 15 days”. And yes, I am beating Mr. Fogg by an impressive 65 days (although a good 137 years later to tell the truth)!
I am flying east, same direction as Phileas Fogg, with stops in Bangalore, Singapore, Seoul, Sunyvale, Toronto and back to London Heathrow. Obviously I am not Jules Verne, but I’ll be blogging each day about my trip.
I had a good start. Check in at Heathrow was nice and smooth, except the stupidity that I have to put my laptop bag into my carry-on luggage while going through security, only to take it out right after clearning security. I guess the queues if passengers were not limited to 1 bag would be even longer, but given that there are no queues in business class, why do the authorities keep enforcing this rule? I really fail to see it as a security measure, it’s just a workload problem.
Day Off, Installing a Satellite Dish
Monday, August 27th, 2007When you put all three together, you’ll find out why. 1) Today is a bank holiday in the UK. 2) We don’t have and we can’t have aerial TV coverage, we can’t have cable TV, and we can’t have Sky because I am not willing to pay anything beyond what we already pay in tax for TV; 3) They are playing the 2007 World Champs in Athletics that we really want to watch. So, I have been assigned a little project: get us the games on TV.
Based on the position of the trees and the house, I am going to try to hit two satellites: Astra 1E at 19.2E and Astra 2D at 28.2E. With Astra 1E I can get Digital+ (Spanish Sky equivalent, but some programmes are free-to-view) and Eurosport DE free. With Astra 2D I can get most of the UK free-to-air (plus Sky Digital). I am not sure Astra 2D will work given the azimuth and the trees … but I’ll try it first.
For my reference:
Satellite at = 19.2 East orbit longitude (Astra 1E)
Dish elevation= 28.6, Azimuth= 158.7 (magnetic compass), Polarisation= -14.8
Polar mounts only: Main angle= 51.9, Downward tilt= 6.7
Satellite at = 28.2 East orbit longitude (Astra 2D)
Dish elevation= 25.68, Azimuth= 148.26 (magnetic compass), Polarisation= -20.76
Polar mounts only: Main angle= 51.9, Downward tilt= 6.7
I’ll be updating this blog entry throughout the day.
Update (11.23AM)
Hmm, it’s not going well. I can’t find signal on either one, I wonder if the trees are blocking all the signal (that’s what it looks from a visual, but I was hoping some signal to go through regardless). Anywa, the house has a flat roof, I have never been up there, but perhaps if I could set it up there … Time to explore!
Update (18.16PM)
Right, I figured out setting the dish on the roof was not an option, at least not for today since I need a very high ladder, which I don’t have. I think I will try next week end to install it by the east side of the garden. That should help to reach elevation and go over the trees.
To be continued …