Joseph Smarr

Thoughts on web development, tech, and life.

Category: Plaxo (page 4 of 4)

More on my new role at Plaxo

I just posted some thoughts on my new role at Plaxo as their Chief Platform Architect. Like my previous roles at Plaxo, this is both a formalization of something I was already doing and a decision to focus more intensely on it. In this case, it’s because Plaxo has ended up in a potentially pivotal position to help keep track of who you know and what they’re doing across all the various sites and services you and your contacts use.

So many services these days are driven by sharing content with your friends/contacts/etc. and yet the problem of wiring up who you know on each of these services and keeping that up-to-date is as unsolved as ever. At best you get a one-time auto-import from webmail providers, but if we’ve learned anything at Plaxo, it’s that persistent sync with your existing address book(s) is the real ticket, and everything else falls short of what users really want–that any time I meet someone new or they join a new service, I can automatically find out about it and stay in touch with them without leaving my existing tools. It’s a hard problem, and one that’s not core to most companies, but it’s Plaxo’s bread-and-butter so we’re eager to dive in.

Actually, It’s kind of funny in retrospect that Plaxo launched in 2002–before Friendster, before flickr, before LinkedIn, before MySpace, before Facebook, etc. Even way back then (heh), we thought the problem of staying connected to the people you know was hard enough to warrant starting a company. The initial pitch pointed out that the “explosion of communication tools” (meaning, at the time, email, IM, and cell phones) was actually making it harder to stay in touch, because there were so many channels to keep track of now, and they all tended to be incomplete and out-of-date. Boy is that ever more true today than it was five years ago! Just like before, all these new tools ostensibly aim to help you stay more connected, but they can only truly deliver in conjunction with a service like Plaxo to help you manage it all.

The good news is that these days we’re in the best position yet to make a difference in this new social web. We have 15+ Million people already using Plaxo, we have 2-way sync with most of the major address books and calendars out there, and most importantly we have built our service on open standards like SyncML, vCard, iCal, etc. that will enable others to pick up where we’ve left off.
This last point is really the starting place for my new role as Chief Platform Architect. We are fortunate to be part of a community of developers and evangelists that cares deeply about keeping the social web open–and thus interoperable. I’ve spent the last few years participating in events like the FOAF Workshop, MashupCamp, Internet Identity Workshop, OSCON, and others, trying to figure out how the community envisions building a user-centric social web and how I and Plaxo can best help. It’s exciting to see the fruits of these events start to ripen–things like OpenID, microformats, cross-site mashups, standards-based identity agents–and even more exciting to get to spend my days figuring out how Plaxo can continue to embrace them, help them continue to develop and flourish, and use our technology and resources to help get them deployed at web-scale.

The company is firmly behind this effort and everyone here gets why open is the way to go. In fact, it’s really the only way to go for us–if you believe (as we do) that people will continue to use multiple tools and services and that no single site will own everything (i.e. if you believe that “the web will continue to be the web”) then you can’t wire everything up in a top-down fashion. You have to agree on standards, keep users in control, and empower them to let their data follow them around wherever they go and share it with whomever they want. There’s still a hard problem to solve in the implementation and operation of such a system, and that’s where Plaxo (and others) will be able to run a thriving business. But believe me, we’ve already written one-too-many custom authentication and sync conduits and we long for the day when a new service can just point their standard sync endpoint at us and the rest is done automagically. The day where I can join a new service and instantly find out everyone I know there–including people that I meet or that join later on. That’s the goal, that’s what I’m working on. Let me know what you think!

The hidden cost of meta-refresh tags

We just discovered at Plaxo that redirecting using meta-refresh tags has a surprising performance penalty as a side-effect: it causes all cached resources on the redirected-to page to be re-requested (as if the user had hit the “refresh” button). Even though most of them should return 304s (if you’re caching them properly), this still results in a ton of extra requests and round-trips. A good workaround is to replace the meta-refresh tags with JavaScript redirects.

A bit more detail

A standard technique for redirecting users from one web page to another is to put a “meta refresh” tag in the first page that says to immediately redirect to the other page, e.g.

<meta http-equiv=refresh content="0; url=http://new-page" />

When browsers see this, they go to the URL specified, and if the time specified before redirecting is (the “0;” in the above example), they’re even smart enough to remove the redirecting page from the browser history so when you press Back you don’t get re-redirected.

However, there is a side effect that none of us knew about or expected. We only discovered it while performance-tuning Plaxo Online 3.0 (coming real soon now!!) while using HTTPAnalyzer. For some people, after the initial visit to the site, on return visits none of the images would be re-requested (we send long cache expiration times, so this is good behavior). But for others, they’d be requested each time they went to the page.

The difference turned out to be that some people were accessing the site by a slightly different URL that uses a meta-refresh tag to go to the actual site. Since “http-equiv=refresh” means “treat this as if I’d sent the equivalent HTTP header ‘refresh'”, the browser (especially IE) acts as if the user had hit the reload button and re-requests all cached images on the redirected-to page with If-Modified-Since and If-None-Match headers. If you’ve got the right cache headers, these requests will all return 304 (i.e. the images won’t actually be re-downloaded), but it still results in a big–and unnecessary/unintended–performance hit because you’re now sending a bunch of extra round-trip requests while loading the page.

The ideal solution for redirecting is to send a 302 redirect response from the web server itself to avoid even loading the intermediate web page. However, there are times when this isn’t feasible, e.g. if you don’t have that level of control over the server or if your template system wants to only do this if certain variables are set. Another case is if you want to redirect from an HTTPS page to an HTTP page–if you try to do this on the server, you’ll get a browser warning about redirecting from a secure page to an insecure page, but if you do it with meta-refresh, it works fine (bravo, browser security dudes, heh). So in these cases you want to redirect client-side, but you don’t want to incur the side-effect of re-fetching all the cached resources.

A good solution is to use JavaScript (while some web developers like to degrade gracefully when JavaScript is disabled, we’re redirecting to a rich Ajax app, so this isn’t really an issue). Wherever you’d use a meta-refresh tag, instead insert the following script block:

<script type="text/javascript">

By using location.replace (instead of, say, location.href=), the browser will purge the redirecting page from the browser history, just like a meta-refresh tag with 0 wait time, which is a good thing. And you won’t get any bad caching side effects, which is also a good thing.

Thanks to the two Ryans for figuring this out! Now you know too. :)

See you at Internet Identity Workshop

IIW2007 Registration banner

I’ll be attending the Internet Identity Workshop (IIW2007a, to be precise) this Mon-Wed at the Computer History Museum in Mountain View, CA. I went to IIW2006b last year and was immediately excited to be a part of this community. The people involved are not only very smart, they’re pragmatic, hands-on, accessible, and motivated by all the right reasons.

The progress of OpenID has been stunning–developing the standard, building libraries, folding in related projects, and getting broad support–and I think we may well start to see its adoption hit the mainstream this year (we’re certainly playing with it at Plaxo these days).

Like other workshops and conferences that I go to, this will also be an opportunity to catch up with a lot of friends that I (for whatever reason) seem to only find time to see at events like these. So if you’re planning to attend, come say hi or give me a call (my latest contact info is linked to from my blog sidebar, thanks to Plaxo of course).

See you there, js

I’m speaking at OSCON in July

Now that the OSCON 07 site is up, I guess it’s official–for the second year in a row, I’ve been selected to give a talk at O’Reilly’s annual Open Source Convention (OSCON) in Portland, OR from July 23-27.

The title of my talk this year is “High-Performance JavaScript: Why Everything You’ve Been Taught is Wrong“. I’m basically going to share all the secrets we learned the hard way while building Plaxo Online 3.0 and trying to make it fast. It turns out that so many of the techniques and axioms used by the AJAX community have serious performance implications, so I’ll explain how we discovered and worked around them. I’ll also argue that a different design philosophy is necessary if performance is truly a goal–one in which every line of code you write has a cost that needs to be justified and in which you assume the platform (web browser) is fragile and brittle rather than infinite and omnipotent. In other words, you have to stop asking “what can I make the browser do?” and instead ask “what should I make it do?”.

In the last few years I’ve been going to a lot of conferences on behalf of Plaxo, and OSCON is easily my favorite of them all. (Thanks again Terry for turning me on to it!) I think it’s because there’s a higher signal-to-noise ratio of people attending who are really building and influencing things to those that are just attending to figure out what all the latest hype is about. It doesn’t feel corporate; it feels like a bunch of smart hackers trying to figure things out together and share what they’ve learned. It’s what many conferences aspire to but so rarely achieve these days. Plus Portland is a really fun town to spend a week in (last year I went to the rose garden, Japanese tea garden, a custom martini bar, and not one but two Dresden Dolls shows).

I can’t wait. See you there!

The origins of Lunch 2.0

In honor of the first officially-sanctioned Lunch 2.0 at Yahoo today, I thought I would finally write something on how and why we started this valley phenomenon:

Living in Silicon Valley is expensive, and the traffic on 101 sucks. So why not telecommute from, say, somewhere in the Midwest? What does living out here get you that working remotely doesn’t? Well, for one, all the other cool companies are out here. And, more importantly, the smart, innovative people behind those companies all live and work out here. But except for hiring employees, we rarely take advantage of that fact. We read about these companies in the blogs, and we use their products, and we’d probably all love to see how these companies and people live and work, but we don’t. Even though they’re like 5 minutes away from us, and they’re full of people just like us that would love to see how we live and work too!

And though many silicon valley companies are ostensibly at least somewhat in competition with one another, I think in most aspects we’re all kindred spirits fighting the same fight—trying to transform the world through technology and build a successful, functioning organization in the process. We all face the same issues: prioritizing features, hiring, nurturing a happy and productive work environment, dealing with growth, dealing with meetings and process (how much is too much? How little is too little?) and so on. Yet we rarely talk about these things, mainly because we’re all so busy trying to figure them out on our own. While traditional conferences may fill this need to some degree, they’re usually too big, too expensive, too impersonal, and too infrequent to appeal to most working people in the valley. But lunch is a perfect venue to get together, “talk shop”, and see how each other are set up. Everyone has to eat, it’s an informal setting, and it tends to be a manageable size. And silicon valley is such a small, closely connected world, that we know people at all the companies we care about within a degree or two of separation.

So initially, we just started doing this ourselves, e.g. “hey, you know so-and-so at Yahoo, can we go meet him for lunch next week?” or “my friend has this new startup and they just got an office, let’s go see them”. We thought others would be interested to see what we had seen, so we took photos and posted them online (in the process, coining “lunch 2.0” since we needed a name for the site, and it felt like a web-2.0 approach to the problem of meeting people). We also blogged upcoming events, but mainly just as an alternative for managing a mailing list of our few friends that wanted to come to these events. As we told our friends what we were doing, more and more wanted to come too, so we just pointed them to the blog, not thinking much of it.

The “we” in this case was initially me, Mark Jen (yes, that Mark; he joined Plaxo right after leaving Google), and Terry Chay from Plaxo (now at Tagged), and Terry’s friend Dave at Yahoo. Mark and I started having more lunches out at friends’ companies and Terry said he and Dave had been trying to do the same, so we quickly joined forces. Terry now tells people he was the “VC of lunch 2.0” because he plunked down the 5-bucks or so for the domain name. :)

The first company to realize that officially hosting lunch 2.0 would be a good thing was SimplyHired in early March ’06. Previously, we all just went to lunch with friends at Yahoo!, Google, and so on, but no one from the company officially “hosted” it, and certainly no one paid for us to eat. But Kay Kuo at SimplyHired wanted to get the word out about her company, so they ordered a bunch of food, gave us a tour of their office, demoed their site, and even gave us some free t-shirts! The event was a huge success, both for SimplyHired and for the people that came. Soon after, other companies started offering to host their own lunch 2.0 events. Mainly this was because someone from that company had attended a previous lunch 2.0 event, gotten excited, and gone back to tell their company they should do the same. Early lunch 2.0 hosts were Meebo, Plaxo, AOL, JotSpot, and Zvents.

Another big milestone was in May 06, when some people from Microsoft’s Silicon Valley Center got permission to host a lunch 2.0 event at their campus. This was definitely the most prominent company to host lunch 2.0 so far, and they did an amazing job, including paying for our lunch at the MSFT cafeteria, providing a tour of their 6-bldg campus, and bringing a lot of their own engineers to the event. By this point, lunch 2.0 had picked up enough of its own momentum that our roles as stewards changed from mainly trying to find and convince new people to host events to just coordinating times and logistics for companies that came to us and wanted to host. That trend has continued thus far, and shows no signs of slowing yet.

Other important milestones in lunch 2.0 history:

  • When JotSpot hosted lunch 2.0, something like 45 people showed up. Previously the biggest event had around 20 people, so this was the first time we thought “whoa, this thing is really getting out there”.
  • Meebo hosted a lunch 2.0 early in the summer and invited all summer interns in the valley to come. They had about 6 employees at the time and were sub-leasing a small amount of office space from another startup. About 80 people showed up, completely filling the office and spilling out onto the street.
  • Zazzle hosted an outdoor BBQ at their office and attracted a record crowd of about 150 people. They also set up tables with umbrellas, a professional BBQ setup and buffet line, custom-printed posters and banners, and even custom-printed lunch 2.0 t-shirts for all attendees.
  • Jeremiah from Hitachi Data Systems organized a combination lunch 2.0 and “web expo” at their executive briefing center. There were about 300 attendees, and we picked 10 data-intensive startups to bring laptops and set up an informal web expo where they could demo their products and talk about how they dealt with large amounts of data.

Going forward, it’s great to see that some of these events have gotten so large, but we also want to make sure that smaller startups can host lunch 2.0 events without feeling like they have to handle a ton of people or spend a lot of money. There are still plenty of cool companies in the area that we’ve never been to yet, so we’re hoping to keep doing lunch 2.0 for the foreseeable future.

Returning to those initial observations about making the most of living in the valley, I think the best thing that’s come from lunch 2.0 is that we’ve met so many other great people in the area, seen how they work, and they’ve met us in return. I feel more connected to what we’re all doing here, and I feel that I’m taking better advantage of the time and space in which we’re all living.

Fixing eval() to use global scope in IE

[Note: This is the first in what I hope will become a series of technical articles on the lessons I’ve learned “from the trenches” of my web development work at Plaxo. Non-techy readers are invited to skip any articles categorized under “Web development”. :)]

Update: This article has been picked up by Ajaxian, and it’s sparked an interesting discussion there. 

At Plaxo I’ve been working on a new (soon to be released) version of Plaxo Online (our web-based address book, calendar, and more) that is very ambitious both technically and in terms of user experience. We’re currently deep into performance tuning and bug fixing, and we’ve already learned a lot of interesting things, most of which I hope to share on this blog. The first lesson is how to correctly eval() code in the global scope (e.g. so functions you define inside the eval’d code can be used outside).

When we built the first version of the new site, we combined all the JavaScript into one giant file as part of our deployment process. The total codebase was huge and it had the predictable effect that initial page-load time was terrible because the user’s CPU was solidly spiked for several seconds while the poor browser choked through the massive amount of code it had to parse. So we started loading a lot of our code on-demand (packaging it into several logical chunks of related files and using dojo’s package/loader system to pull in the code as needed).

All was well until we started defining global functions in the loaded JavaScript. (We did this mainly for event handler code so we didn’t have to spend time walking the DOM and finding all the clickable nodes after injecting innerHTML to hook them up to the right scoped functions.) In Firefox, everything kept working fine, but in IE, none of the global functions were callable outside of the module being loaded on-demand (you would get a typically cryptic IE error that in effect said those global functions weren’t defined). It seemed clear that when the code being loaded got eval’d, the functions weren’t making it into the global scope of the page in IE. What was unclear was how to fix this.

Here’s a simplified version of the situation we faced:

function loadMyFuncModule() {
  // imagine this was loaded via XHR/etc
  var code = 'function myFunc() { alert("myFunc"); }';
  return eval(code); // doesn't work in FF or IE

function runApp() {
  loadMyFuncModule(); // load extra code "on demand"
  myFunc(); // execute newly loaded code

The thing to note above is that just calling eval() doesn’t stick the code in global scope in either browser. Dojo’s loader code solves this in Firefox by creating a dj_global variable that points to the global scope and then calling eval on dj_global if possible:

function loadMyFuncModule() {
  // imagine this was loaded via XHR/etc
  var code = 'function myFunc() { alert("myFunc"); }';
  var dj_global = this; // global scope object
  return dj_global.eval ? dj_global.eval(code) : eval(code);

This works in Firefox but not in IE (eval is not an object method in IE). So what to do? The answer turns out to be that you can use a proprietary IE method window.execScript to eval code in the global scope (thanks to Ryan “Roger” Moore on our team for figuring this out). The only thing to note about execScript is that it does NOT return any value (unlike eval). However when we’re just loading code on-demand, we aren’t returning anything so this doesn’t matter.

The final working code looks like this:

function loadMyFuncModule() {
  var dj_global = this; // global scope reference
  if (window.execScript) {
    window.execScript(code); // eval in global scope for IE
    return null; // execScript doesn't return anything
  return dj_global.eval ? dj_global.eval(code) : eval(code);

function runApp() {
  loadMyFuncModule(); // load extra code "on demand"
  myFunc(); // execute newly loaded code

And once again all is well in the world. Hopefully this is the type of thing that will be hidden under the hood in future versions of dojo and similar frameworks, but for the time being it may well impact you if you’re loading code on demand. So may this article save you much time scratching you head and swearing at IE. :)

(PS: Having found the magic term execScript, I was then able to find some related articles on this topic by Dean Edwards and Jeff Watkins. However much of the details are buried in the comments, so I hope this article will increase both the findability and conciseness of this information).

Guy Kawasaki likes my Plaxo widget!

This was a pleasant surprise to wake up to yesterday: Guy Kawasaki, the widely read startup guru whose top-ten lists of do’s and don’t for entrepreneurs are gospel here in the valley, posted a new top-ten list called “The Top Ten Stupid Ways to Hinder Market Adoption“. Number 8 caught my attention in particular:

8. Requirement to re-type email addresses. How about the patent-pending, curve-jumping, VC-funded Web 2.0 company that wants to you to share content but requires you to re-type the email addresses of your friends?

I have 7,703 email addresses in Entourage. I am not going to re-type them into the piece-of-shiitake, done-as-an-afterthought address book that companies build into their products. If nothing else, companies can use this cool tool from Plaxo or allow text imports into the aforementioned crappy address book. When do you suppose a standard format will emerge for transferring contacts?

Wow, Guy is telling startups that if they don’t use the widget I built for Plaxo, they’re stupidly hindering market adoption! He’s also selling it exactly the way I would–you already have an address book, so sites should let you use it rather than foisting their own half-baked version with none of your contacts on you. :)

On a personal note, Guy was one of the “industry thought leaders” I listened to at Stanford during the bubble who cemented my zeal for doing startups (ah, the euphoric pre-crash days of sitting in a packed Stanford auditorium on Friday afternoons for IE292 and listening to people like Mike McCue and Marc Andreesen explain convincingly why the tech sector was still vastly under-valued). Guy is a fun and charasmatic speaker and his delivery is always very punchy.

What I remember most vividly from his talk (now nearly 7 years ago) was his “Stanford Shopping Mall Test” for picking VCs–if you saw the VC across the way in the (large, open-air) Stanford shopping mall, would you (a) run over to see him, (b) say hi if you happened to bump into him, or (c) get in your car and drive to another mall. You should only pick VCs for whom you answer (a). I don’t know if it’s true, but it sure sounded good! I’ve since read his Art of the Start, which contained similarly memorable advice, such as “flow with the go”, meaning if/when people adopt your technology for some purpose other than you originally envisioned, embrace the change instead of resisting it.

Given the impact that Guy’s had on me and most of my cohort here in the valley, it was certainly a trip to see him evangelize something I worked on. I went into work with a little extra bounce in my (admittedly already quite bouncy) step. :)

FOAF Workshop Talk

Technical and Privacy Challenges for Integrating FOAF into Existing Applications
FOAF Workshop
Galway, Ireland
September 2, 2004

Full paper (HTML)

Download PPT (2.1MB)

FOAF stands for friend-of-a-friend and it’s an open standard for describing your contact information and who you know. When social networking sites started exploding, many people were annoyed that they had to keep entering this information over and over again, and they also wanted to maintain ownership of their own information. I got excited about the potential for FOAF at Plaxo because we’re always looking for new ways to help users get their data in and out of other applications and services. Unlike most social networks, we don’t benefit from keeping your data trapped in a walled garden–quite the opposite! When I started looking mroe seriously at implementing FOAF in Plaxo, I noticed a number of issues–both technical (e.g. how to handle authentication) and privacy-related (e.g. do I have a right to publish contact info about the people in my address book, or is that their call?) that I thought the FOAF community should be talking about. After writing a blog post for Plaxo about the potential for FOAF and its challenges (which turned out to be our most popular post for quite some time), I expanded it into a full paper, which I presented at the FOAF Workshop in Galway, Ireland. I went to Ireland a few days early and spent them in Dublin, which I absolutely loved. Ireland has this enchanting mix of old- and new-world culture, it’s all iridescently green, and the people were all friendly. I took the train cross-country to Galway, which is also a very cool town.

I haven’t heard much about FOAF lately, though I believe the project is still being worked on by some people. I had high hopes that Marc Canter’s FOAFnet project (a subset of FOAF that lets you import and export your social network data from a web site) would be simple and sexy enough to gain widespread adoption, but it doesn’t look like it ever happened, most people don’t seem to be outraged that they have to maintain separate profiles and contact lists on MySpace, Facebook, LinkedIn, and so on. Maybe one day these sites will all sync with Plaxo, but until then they continue to be separate walled gardens that own your data.

Mashup University Talk

Smarten Up Your Address Book with a Plaxo Mashup
Mashup University (part of Mashup Camp 2)
Mountain View, CA (Computer History Museum)
July 12, 2006

Download PPT (1.7MB)

Watch the complete video of my talk (QT, 78MB)

Plaxo sponsored me to give a talk at the beginning of MashupCamp2 (alongside speakers from Microsoft, AOL, and Intel) during its new “Mashup University” section. I talked about the Plaxo widget and our APIs and why they’re a useful ingredient for many sites. MashupCamp itself was also great fun, and it made me a strong believer in the style of un-conferences (where the schedule is formed ad-hoc by the participants when the conference starts), something I’ve since used at Plaxo to cut down on scheduling meetings. Rather than trying to get on everyone’s calendar, we just reserve Tuesday afternoons for an internal unconference we call Meataxo (yes, the spelling is intentional–we had to do something to make the idea of a meeting marathon sound fun :)).

I’ve covered my talk at MashupU in more detail on Plaxo’s blog, and Joe “Duck” Hunkins also wrote a great summary.

Cross-Site Ajax (OSCON 2006)

Cross-Site Ajax: Challenges and Techniques for Building Rich Web 2.0 Mashups
O’Reilly Open Source Convention (OSCON) 2006
Portland, OR
July 26, 2006

Download PPT (1.8MB)

This was the first OSCON I ever attended. I had a great time and I met a lot of amazing people. I’m definitely going back next year. Much of what I discussed in the talk came from work I did on the Plaxo widget, and the point of this talk was to share the techniques I’d learned and also to raise awareness and debate of the larger issues and privacy/technology tradeoffs involved. I’ve covered this talk in more detail on Plaxo’s blog (thanks Plaxo for sending me!). Kevin Yank also blogged a summary of the talk.

Newer posts

© 2016 Joseph Smarr

Theme by Anders NorenUp ↑