Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SpreeConf 2014 - Scaling Spree to tens of thous...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

SpreeConf 2014 - Scaling Spree to tens of thousands of online stores

GoDaddy, the world's largest platform for small businesses, is building its next generation SMB ecommerce platform on top of Spree. This presentation will walk thru the journey to adapt Spree to support tens of thousands of Stores on a multi-tenant configuration, drastically simplifying the user experience and introducing some new features like Bootstrap based responsive design and replacing the Storefront template language.

Avatar for Antonio Silveira

Antonio Silveira

February 26, 2014

Other Decks in Technology

Transcript

  1. How GoDaddy Plans to Become a Real Tech Company For

    Real People GoDaddy to Make WordPress Implementation a Snap CNBC: GoDaddy Shifting Strategy: Ad Features Revamped Image GoDaddy Acquires (mt) Media Temple to Accelerate Web Pro Expertise AllThingsD: ! Former Yahoo Exec Blake Irving Named CEO of Domain Giant GoDaddy #spreeconf
  2. Current e-commerce Product • Over 60.000 stores • but with

    high churn • Too difficult to use • Aging Tech stack • Not easy to extend #spreeconf
  3. Tech Stack • CentOS 6.5 • MySQL 5.5 • Ruby

    2.1 • Rails 3.2.17 • Spree 2.0 • Unicorn 4.8 • Delayed Job • Bootstrap 3.0 • Apache 2.2 • StatsD, Graphite, NewRelic, Mini- Profiler • HA Proxy and Apache Traffic Server • Akamai/CDN • GitHub Enterprise • Jenkins for CI/CD • Puppet • Hadoop #spreeconf
  4. Overview Load Balancer ATS HAProxy ATS HAProxy MySQL MySQL MySQL

    Memcached App Memcached App Memcached App #spreeconf
  5. What is different from Spree? • Focus on non-technical users

    (DIY) • Added Multi-Tenancy • New Admin UI • GoDaddy integrations (Domains, Authentication, others) • Using Bootstrap on the Admin • New template engine for Storefronts #spreeconf
  6. Multi-tenancy "Namespaced" Single DB! • Similar to some extensions •

    Harder to maintain and merge with Spree • Simpler DB Connection Management Multiple DBs! • 1 DB per Merchant • Apartment Gem to manage DB connections • Similar to our current product • Easier to keep sync with Spree • Doesn't change Spree Models https://github.com/railsdog/spree_landlord https://github.com/influitive/apartment #spreeconf
  7. Multi-tenancy with Apartment Apartment::Database.create(‘mystore’) Apartment::Database.switch(‘mystore') Routing requests to the proper

    db via Elevators: • Domain, Subdomain, Hash, Generic #  config/application.rb   require  'apartment/elevators/subdomain'  #  or  ‘domain’  or  'generic' #  application.rb   module  MyApplication      class  Application  <  Rails::Application          config.middleware.use  'Apartment::Elevators::Subdomain'      end   end Concept of Tenants Accessing mystore.onlinemall.com will trigger an Apartment switch(‘mystore’) #spreeconf
  8. New User Interface • Using Bootstrap 3.0 • New On

    Boarding • Simple Dashboard • Products Page and taxonomies • Simplified Taxes and Shipping • Straight fwd Payments options • Order Detail and List, simplified the state flows • Added Themes and Pages #spreeconf
  9. StoreFront • No Ruby code on templates • Still powerful

    but safe • Complete freedom for designers • Liquid template engine • Snippets/Partials • will open to anyone to create templates/themes • Versioning def  render_liquid_page(page,  data=[])        @template_data.merge!(merge_hashes(data))        @template.render_page(page,  @template_data).html_safe   end / frontend / app / helpers / spree / store_helper_decorator.rb / frontend / app / views / spree / home / index.html.erb <%=  render_liquid_page('index',  load_featured_products_drop)  %> def  load_featured_products_drop              featured  =  GDSpreeCore::Themes::Drops::ArrayWrapper.new(                      Spree::Product.first(4).collect  {  |p|  GDSpreeCore::Themes::Drops::Product.new(p)  })   !            {  'products_featured'  =>  featured  }   end / frontend / app / controllers / spree / store_controller_decorator.rb #spreeconf https://github.com/shopify/liquid
  10. What’s next? • Continue to surface more Spree features •

    Upgrade to Rails 4 and Spree 2.2 • Continue to improve on Performance • Improve the API • Javascript Front End (Angular.js) • Open Themes for Designers/Developers • Elastic Search / Hadoop #spreeconf