Since this is my first blog post, I thought I’d start with where it all began, a summer internship at LinkedIn, in June of 2010. I love Ruby on Rails and my summer project here was to write a LinkedIn opensocial Rails application for use on third party websites. It was a lot of fun, and in ten weeks I went from just knowing ruby on rails to creating an end-to-end prototype that became the basis for a production app accessible to 500 million users on My Yahoo. In this post, I'll give you a quick glance at the app, the architecture behind it and a little bit of code.
The idea behind opensocial is to allow the creation of applications that can be embedded within a social network or any site across the web. The LinkedIn opensocial app I worked on would allow users to access LinkedIn data and functionality outside of linkedin.com. You'd be able to see your connections, check out network updates, browse profiles, as well as post comments, share articles and send invitations. You can check out screenshots of the app below.
Here's a high level overview of how the app was put together:
The Rails backend was responsible for communication with the LinkedIn Rest API's, fetching data on behalf of a LinkedIn user and rendering it to the opensocial container. We used memcached to cache user data for better performance and MySQL to persist the user’s oauth access tokens. The communication between the Rails backend and the LinkedIn API was done using three-legged OAuth. I created a wrapper for the Ruby OAuth gem to make it easier to fetch LinkedIn data. You can see the code in this gist as well as a sample of it at the bottom of the post.
Going full time
LinkedIn doesn't shy away from giving interns full scale, end-to-end projects. To help you out, the company is full of great engineers that I could learn from, including Alejandro Crosa, who guided me every step of the way. After an amazing summer, when I got the offer to come back and work full time, I jumped right in. I loved the projects I got to work on - I'm currently contributing to LinkedIn Polls - and a culture where I could fit right in. And of course, there are also LinkedIn HackDays where I get to work on anything that I find interesting; too good to resist.
Here is snippet of the LinkedIn OAuth wrapper. You can see the full source in this gist.