Technology, Uncategorized 0 comments on Being RESTful ain’t that easy

Being RESTful ain’t that easy

This is a more technical post, and so if you aren’t interested in some nuances of browsers and Internet architecture, then you should pass on this one. It’s okay, you won’t hurt my feelings.

Man, we ran into a doozy today. We had one report from a user that people weren’t able to enter their moderated video chats. We weren’t sure that made any sense, and we couldn’t find any records of failure to enter the video chat in our error logs. It turns out we made two mistakes. First, we didn’t gather enough information. Second, we didn’t understand the errors we were getting back. Both, thankfully, are now fixed, but the journey was an interesting one.

First, let me give a little bit of background on our new architecture. We’ve just released our new call moderation stack at TokBox, and, to do so, we really sat down and thought through how to build this functionality in an Internet architecture appropriate approach. We came up with a really solid, RESTful API. The basic premise here is that all actions have a URI, and are a very specific contract between two endpoints (one being the user making the call, the second being our server). It was all very well tested on a Mac in both FireFox and Safari.

Here’s where the real journey begins. In RESTful fashion, we are defining the user’s role in a moderated chat by transitioning them from an “ASK” state where they are essentially knocking to get in, into a “PARTICIPANT” state where they have joined the call. The modify action uses the POST verb (though technically it should use the PUT verb, we weren’t confident in the Flex framework’s HTTPService class to handle this properly, and have instead limited ourselves to POST and GET), and then redirects to the user info action which returns the updated role, as well as any profile information about the user that might be pertinent to the video chat.

Now here is the gotcha. We use an HTTP 302 redirect to move between the actions. In all browsers not IE, it looks as if the 302 happens by first doing the verb of your choosing (in our case a POST), and then a GET to the redirected site. According to the spec as we read it, this is probably wrong. In fact, the redirect needs to ask the browser which verb to use in the HTTP/1.1 spec. Seems as if the HTTP/1.1 spec is either being misinterpreted, or the HTTP/1.0 spec is being maintained to enable backwards compatibility with how sites acted. Why did this cause us a problem? Because in IE7 & IE8, the 302 redirect does a POST (essentially repeats the original verb action). Our user info action was scoped as only accepting GET requests. The result… guest users couldn’t enter a moderated video chat from the IE family of browsers because the redirect fell into an error state, and didn’t return the proper response.

It took watching the TCPDump coming across the server across multiple browsers and API calls to figure this one out, but in the end we learned a very valuable lesson about how redirects work, making RESTful APIs work cross browser, and making sure we test across all combination of browsers and scenarios.

Extreme Blue Internship, just thinking out loud, New Year Resolutions, Uncategorized 1 comment on Good bye old friend

Good bye old friend

My best friend Matt D. and I have a tradition to which we’ve held since the summer of 2006. Whenever we go out to eat, to complain, to laugh, to cry, we always end up at Outback Steakhouse. There was one down the road from where we stayed during our IBM internship, and from there a tradition was born.

Since that summer the standard plate has been:

  • Outback Special ( size dependant on hunger )
  • Side of mashed potatoes
  • Bloomin’ Onion ( of which 90% is always finished )
  • Salad ( dressing is consumer dependant )
  • Coke to drink ( they never had sweet tea )

We went, and ordered the exact same thing, for the whole of the Summer of 2006. I came back out a few times for interviews or just to visit Matt, and we always went. I moved out to the Bay Area, and at our footsteps were all of the shops and restaurants of downtown Palo Alto and Mountain View, but we never broke. You can take a hick out of the country, but you can’t take the country out of a hick ( or so the saying goes ).

Alas, all good things must come to an end. And so it is for the Outback tradition. Tonight was the end of something truly special to us both. Yeah, it was just a restaurant, and not a great one at that, but we really grew up together in those oversized booths eating greasy fried onion strips, and mixing our mashed potatoes with steak. We escaped into our own world. Jobs, dreams, and heartbreaks were all up for discussion between courses. We genuinely fulfilled the Jimmy V legacy of laughing, crying, and spending time together thinking about how we were going to save the world.

So, what changed? It wasn’t the steak or the Bloomin’ Onion that’s for sure. It was us. In front of us is a brave new world filled with adventures and turns we’ve never imagined. And as we embark into this brave new world we bid our past good bye with the anticipation of building new, better and a bit healthier traditions. But at the same time we do so with a small tear in our eye.

I’m really optimistic about the future, having now looked back on where we came from. To this day, I’ve kept an e-mail I got from Matt in the Fall of 2006 after our paper was presented to a packed audience by our mentor, and friend, Eishay Smith. It’s a one liner:

Subject: Us
Body: Yeah, we kick ass!

And watch out because we’re going to do it again

just thinking out loud, Uncategorized 0 comments on Freedom for $3 per gallon

Freedom for $3 per gallon

My only sources of peace lately have come from two sources. The first is the feeling of a late night crawl into my side of a warm bed after a late night hacking session. The second is driving in a car along the Pacific Ocean.

I hate driving long distances, or at least I hated driving long distances. No further than Myrtle Beach was my general limit, self-imposed of course. I think the cross country road trip that I did summer of 2007 cured me of that antsiness and boredom. I really only fell in love with this country after I saw it from the the road. And now the road is my major source of peace…

Case in point. I drove down fo Monterey this past Wednesday, and experienced an entirely calm and relaxed day. In fact, we went to the CVS around midnight to get some bottled water, and I went by the pharmacy to check out my blood pressure. The reading was 117/67 with a heart beat of 65 bpm. In San Francisco, I’m a borderline hypertensive on my way to pill boxes with the days labeled to make sure I don’t miss my meds. After a day on the road I’m healthy, relaxed and, ultimately, at peace.

I’m really worried about this inability to find peace outside of the road. I can’t find a way to wind down, and it’s really leading to a situation where I’m fighting against everything just to get some breathing room. It doesn’t help that I live with someone with whom I work, but that would be an excuse, and entirely unfair to Micky. I had this problem when I lived alone, but was only two blocks away from work as well, and discovered that turning those two blocks into ten went a long way towards getting me straightened out this past spring.

Something about the mindlessness of getting home is what I’m missing now. I hypothesize that being more of a regular at the gym early in the mornings will help with this. The goal there is finding a better outlet for whatever angst I’m experiencing. So far, I think, so good. If that doesn’t help, I’ll need to find something else to replace the peace which is an open highway and the Pacific off to the side crashing against the cliffs and beaches of California’s awkward coast line.

Until then though I’ll keep getting my freedom for $3 per gallon over one windy stretch of CA-1 after another.

just thinking out loud, Uncategorized 2 comments on Leaving the bubble behind

Leaving the bubble behind

It has taken me almost six months to write this post. It’s been floating in my head for a long time. Since she left really. But I had to really know what I wanted to say. This isn’t a breakup post with a person or a closing of a chapter.

This is an end.

I feel like the straw that broke the camels back came from realizing that I was better away from everything that once made me whole. It was better for me to cut the cord on my past. All an individual builds on top of is what has happened to them. My foundation crumbled. I picked up the pieces that I wanted (or needed) to salvage. At first I tried to build a shelter from the pieces. That didn’t work. Instead I found myself forced to start over.

When I first moved out to San Francisco, I didn’t find myself investing in being here for long. One foot was already out of the door on my way back home to what I knew and to where I was king of my own domain. To say the least, that plan exploded in my face. Looking back now, I think it may be the best thing to have happened to me in an utterly perverse and masochistic way. I scratched and crawled to keep things as they were. I failed.

What I didn’t realize was how this was really an ending, and not a turn in the road. The turn had happened almost ten years previously. I had finally found the dead end that I had chased for a decade.

I honestly don’t know what I did next. There’s this emotional and mental block for a big stretch of the past spring and summer. I think what really happened was that someone else, or some group of someone elses, just kept me going. They were very much guardian angels without wings.

It was only after the last family vacation that we will ever have that I found myself both relieved of, and in some regards forgiven for, my past. Whatever the gorilla was, and I never really figured out what it was, it was gone.

In coming home from that trip I found that I was a borne again believer in myself. I never really realized how little confidence in myself I had left.

Since that trip, and the month of fasting that came immediately after it, I think that I have finally focused on what matters the most. I’ve refilled my confidence tank. My health, my personal development, my friends, my family, my love were all second class citizens. Now they are first on my mind, and first in my heart. It took me a long time to find that too.

It took me six months to write this post because in many ways I was mourning the death of who I was. That kid was really amazing in so many ways. The kind of guy you root for in the movies. I think that he got lost in himself somewhere, and the rest as they say is history. I can’t say that I will miss him, but I can say there is a hole where he once was. Instead of looking back, I can look ahead and declare…

This is now a beginning.

New Year Resolutions, Uncategorized 1 comment on 10 Resolutions for 2010

10 Resolutions for 2010

Much has been made of moving through the first decade of this century (and of course this millennium) with all of the “Best of” and “Top 10 of” lists written by newspapers, magazines, blogs and the rest. It’s hard work to look back and try to understand the best of what has happened. Do we focus on the positives? Graduating high school and college. Getting my first job. Finding Micky. It’s not really worth reliving the negatives. They are better off left in the past.

This post is about looking into the future. It’s vast, it’s scary, and it’s full of opportunity. To really jump into the next year with both feet, I’ve decided to set ten resolutions for myself. In picking my resolutions, I had a couple of metrics in mind. First, the resolutions should be easy to measure. It should be put into the public eye, which I think gives a higher incentive to get the resolution accomplished. It should also somehow improve my ability to accomplish my longer term goals, which I’m going to document in another post this month. All of that said, the final list is:

  1. Lose 25 pounds by June 1st
  2. Play a round of golf in the 80s
  3. Increase my personal savings by one-third
  4. Finish the initial BFBP product
  5. Blog five times per month
  6. Visit one new country, and three new places
  7. Run a half-marathon
  8. Learn to Tango
  9. Support Micky in helping her stop biting her nails
  10. Support Micky in helping her finish her sailing qualifications

I really do think that I’ve got a list here that’s going to set me up to be both happier today, and a better me in the future. I’ll be keeping track of my progress on this blog (which will help with item #5). What are your resolutions? What are you doing to make sure that you accomplish them?

Welcome 2010, and let the fun begin!