Janrain Use Case Study
Total Page:16
File Type:pdf, Size:1020Kb
Janrain Use Case Study If you are a heavy computer user, you’ve probably built up a long list of passwords and logins, so much so that you might have a hard time remembering them all – perhaps particularly so as the world has seen the emergence and explosion in popularity of social media channels. And let’s face it, many of us like to do things as quickly and painlessly as possible. Enter Janrain, a young startup based in Portland, Oregon. They make JUMP (Janrain User Management Platform), a cloudbased means for companies to acquire, connect with, understand and manage customers across digital and marketing media. Early on they knew that they would need a programming solution that would scale rapidly, cleanly and easily, that they could code concurrently in, without errors, and that offered high performance. After toying with Ruby on Rails, they quickly shifted to the functional programming language Haskell for the majority of their design. Unlike other languages Haskell ensures that companies can enable their development and production teams to maximize their productivity, performance, quality, scalability and agility in ways that no other programming language can. Only Haskell’s model of functional programming provides all of these benefits and a growing number of companies, like Janrain, are realizing these benefits for their applications. These advantages result in substantial savings over product and service lifecycles, allowing developers to concentrate more on innovation and less on operational issues. What is JUMP? JUMP was conceived in 2009 as full User Management solution that helps organizations succeed on the social web by leveraging the popularity of social networks and identities for online user acquisition, engagement and enhanced customer intelligence. The component technologies include social login the ability for a consumer to use an existing identity from a provider such as Facebook, LinkedIn, Twitter, Google, etc. (in fact, more than 30 global providers) instead of registering and/or submitting a username and password combination. It also includes a full registration solution, the ability to collect, store and manage social profiled data which can be shared with other enterprise applications such as CRM, Email Service Platforms, CMS and more, social sharing and single sign on capabilities. Broken Rails Janrain needed to develop their solution with a backend database to securely store user profiles, along with an easytouse API accessible by an HTTP interface. They began initial development utilizing Ruby on Rails, with one element of their backend development in Haskell’s Snap framework. But it wasn’t long before their development team began experiencing errors in their coding using Ruby, as their volume of code grew, while their work in Haskell resulted in lean, errorfree code. Further success using Haskell enticed Janrain to complete development of their registration solution’s backend entirely in Haskell, to ensure a robust, highlyscalable framework capable of supporting future burgeoning customer use. Their coders saw that Haskell was an excellent resource to add new features to their solution easily and securely, yet tersely. “Our practical users learned to code in Haskell easily, becoming knowledgeable in under a year and Copyright 2013 FP Complete Corp. proficient in one to two years,” noted Philip Weaver, Senior Software Engineer at Janrain. “They didn’t have to be PhD’s in computer science to pick it up and could write error free code that was much faster and easier to maintain than in Ruby.” Janrain’s team spent little time debugging and testing their Haskell code, confident that greater than 75% of their code would be right and that the builtin type checking functionality would catch what few errors arose – what Mr. Weaver describes as being able to “rewrite fearlessly” without breaking the code, as they’d found altogether too common in Ruby. Another necessity in their registration solution development that Haskell helped Jainrain meet was for the backend to support JUMP’s multitenant architecture, with numerous simultaneous API calls from multiple clients. Haskell’s architecture ensured that JUMP would run with strong concurrency and IO with latency in their server environment, so that the frontend could send and receive multiple calls from their diverse clientele with ease, while maintaining a high level of performance. Haskell’s capabilities ultimately enabled Janrain to: ● Develop robust, clean prototypes with few errors. ● Write terse code quickly and easily, while accommodating scaling in their backend to address growing customer demand. ● Deploy changes and new functions simply, readily and errorfree. ● Reduce time spent on testing and debugging significantly. “Haskell does exactly what we need it to do every time,” Philip Weaver explained further. Switching to a New Track As they shifted into production, Janrain saw their solution was now capable of handling thousands of logins per second thanks to the robust nature of the Haskellbased backend, fully expecting that it would support the ten thousand logins per second they expect to reach as their client base grows. In contrast, Ruby constraints limited its use to prototyping their API and performing only simple modifications in the production version, after meatier modifications caused significant failures. “We didn’t have to worry about breaking our Haskell code,” Mr. Weaver further explained. “It just runs and runs, no matter how much we add to it or change. We try not to touch Ruby very much, out of fear of crashing the API.” Jainrain also realized that the simplicity of the Haskell architecture ensured easier maintenance while in production. Steaming Ahead Haskell’s reliable, extensive type system and checking functionality gave Janrain the confidence to build an expansive backend database solution free of the faults and hangups they had experienced in the API development in Ruby on Rails – thereby producing the highest quality code, all the while decreasing development time extensively when moving to production from prototype mode. The modularity and libraries in Haskell facilitate extensive code reuse and parallel development, further enhancing the productivity programming teams can achieve, while greatly increasing reliability and reducing errors. What’s more, Haskell’s native functionality, by eliminating shared values and interdependencies, increases scalability and performance, ensuring functions can be run in parallel on multiple processors and cores. Ultimately Janrain found that: ● Significant time savings in the development cycle led to greater overall productivity. Copyright 2013 FP Complete Corp. ● Haskell’s compiler caught the few development errors that occurred, greatly increasing their commercial application’s performance. ● Robust code ensures longterm application reliability and future changes can be made without compromising performance for their customers. ● Scalable performance allowing them to handle thousands of requests per second with the possibility of reaching tens of thousands of requests per second. ● Reduced development costs and easy application innovation drives high ROI. Copyright 2013 FP Complete Corp..