Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The Evolution of a Scrappy Startup to a Successful Web Service


Published on

Code Camp Presentation November 2008.

Published in: Technology, Business

The Evolution of a Scrappy Startup to a Successful Web Service

  1. 1. The Evolution of a Scrappy Startup to a Successful Web Service<br />PoornimaVijayashanker – Software Engineer<br />November 7, 2008<br />
  2. 2. What is <br />My Bio<br />Came up with the name and the second employee<br />Getting off the ground<br />Used open source tools: Eclipse, mySQL, Apache Tomcat<br />No prior experience at a startup or in web services<br /> today<br />
  3. 3. Creating a prototype<br />Prototype: <br />a rudimentary working model of a product or information system, build for demonstration purposes or as part of the development process. <br />
  4. 4. What doesn’t belong in a prototype? <br />Don’t waste time spec’ing out a complete feature set<br />“Everyone by now presumably knows about the danger of premature optimization. I think we should be just as worried about premature design - designing too early what a program should do. “ <br /><ul><li>Paul Graham</li></ul>’s mission statement: “Do more with your money.”<br />Aggregate checking, savings, and credit card accounts<br />Show balances <br />Auto-categorize transactions<br />
  5. 5. What does belong in a prototype.<br />Started small by focusing on features that differentiated our product<br />Focus on solving critical user problems. Engineering problems arise from their solutions.<br />e.g. Financial data is a sensitive matter, needed a good security model.<br />Handle concurrency amongst our 100+ users, and making sure we were encrypting stored data. <br />Bare-bones implementation for algorithms is sufficient. Don’t get tied down to any one particular solution. Refine in subsequent releases and based on product specifications.<br />Simple unit test framework, no system tests; focus was to get the product out there and have real users test it with real data!<br />
  6. 6. What did our application server look like? <br />Single Server<br />Web layer and analysis engine, wired together using RMI. <br />UI -&gt; Business Logic -&gt; Data processing engines<br />Single data base that consisted of less than 50 tables<br />
  7. 7. What did our code base look like? <br />A few key choices during prototyping molded our software’s architecture, and affected the longevity of our code base <br />e.g. Choice in messaging system: JMS, RMI, or none<br />Re-factored code into logical modules to avoid spaghetti code, a task that would have been much harder to do later on, especially with a growing team and code base.<br />
  8. 8. Web Application to Web Service<br />Prototype -&gt; Product likened to Web Application to Web Service. <br />Application is a point tool used to complete a simple tasks<br />Web services is more than features<br />Goal is to create a product with growing user base you have to broaden thinking from features to logistics<br /> <br />
  9. 9. Prime mover of Software’s Architecture<br />User Growth Rate<br />To solve the business problem of becoming profitable you have to grow the user base <br />More users -&gt; Growing Pains<br />Need to be addressed in a timely manner in order to continue to grow and keep the existing users happy.<br />
  10. 10. Computer Architecture 101<br />Latency: a reasonable response time<br />Throughput: satisfying many requests without compromising latency<br />Quality: accurate data and reliable service<br />Address points of failure<br />
  11. 11. How do you achieve each?<br />Latency: affected by amount of data that needs to be retrieved, in order to satisfy the incoming requests.<br /> e.g. computed data and persisted to db, as users increased reading/writing to the db took forever. <br />Switched to loading user data into a cache upon login and then computing.<br /> <br />
  12. 12. Throughput: handle multiple requests/processes<br />Separate into code into tiers (UI, web, business/service logic, DAO, db) in parallel data processing/retrieving tier <br />Separate data engine from web engine <br />One server for handling data processing<br />One server to process user requests and serve user pages<br />Tune each server based on its needs (web vs. analysis) <br />
  13. 13. Quality: low bug count, which is directly proportional to incoming number of customer service requests<br />Testing (unit, load, and system)<br />Beware of the vocal minority, by measuring the number of users impacted by a bug.<br />
  14. 14. Optimization: improving performance of code at runtime in order to satisfy latency and throughput requirements. <br />“…premature optimization is the root of all evil.&quot; – Donald Knuth<br />
  15. 15. How to Measure<br />Created internal tools to measure the performance of our code base, which helps figure out where to optimize.<br />Product will continue to evolve in approximately 6 month cycles. <br />Don&apos;t waste time optimizing everything, or before you see a demand for a feature.  Remember its a startup; resources are scarce and time is critical.<br />
  16. 16. What to measure<br />How quickly a data set is going to grow when designing tables, foreign key associations, retrieving data, and frequency with which data is accessed<br />Sharding: break up a large database into smaller pieces that contains redundant information or a parent db can map data to separate dbs.<br />Implementation was based on user id lookup<br />Easy to shard because we were dealing with financial data that is restricted to a single person, each user and their data was limited to a single shard, unless services like Twitter or Facebook that have lots of interactions amongst users<br />
  17. 17. Review Decisions<br />We didn’t cache user data from the start because synchronizing data across nodes was difficult and had no mechanism for centralized locking, but once this was put in place we switched to loading data on demand<br />We didn&apos;t shard databases from the start because of overhead and more impending issues.<br />In the future we might only show most recent data instead of all data).<br />
  18. 18. Summary <br />Prototype with limited features<br />Addressing CS 101 Basics: Latency, Throughput, and Quality<br />Making architectural decisions based on the time frame<br />Measure and Optimize that which is critical<br />Check it out:<br />My blog:<br />