Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Powered by
Me llamo Miguel
I do this
My Team
“Mermaid Tucker”
#OpenCommerce
mtucker@godaddy.com
@mtazva
Online Store
The Pit of Success
Why Spree?
● Easily Customizable
● Fully Featured
● Existing API
● Highly Extensible
● Great Community!
by developers
for developers
Simplifying the Experience
● Grid-based options building
● Simple customization via themes engine
● Automatic PayPal activ...
Magnifying the Impact
● Automatic email marketing integration
● Simple and automatic Facebook store
● One-click product re...
SaaS-ification
● Multi-tenancy
● Themes engine
● Internal integrations (single sign-on, domains, others)
● GoDaddy branding
We are
the 1%
Making the Sale
Get Published
Making the Sale
Get Social!
Scaling Spree - Tech Stack
● CentOS 6
● Ruby 2.2
● Ceph (internal cloud storage)
● Github / GHE
● Jenkins for CI/CD
● Pupp...
Scaling Spree - Architecture
A10
CommonDB
API
(4)
App
(6)
MerchantDB
ATS
HAProxy
ATS
HAProxy
ATS
HAProxy
ATS
HAProxy
SSL T...
Scaling Spree - Performance
● 10s of thousands of unique live storefronts
● ~1.5M page views per day
● Average page respon...
The ActiveRecord Callbacks Problem
● Obscure business logic. Explicit => Implicit
● Often have unintended side effects
● R...
that!
The AR Callbacks Problem
Option Type Product
Taxonomy
Taxon
Option Value
1:1 1:M
1:M
1:M
Variant
1:M
1:1
parent
Variant
Pr...
Yo Dawg
I heard you like ActiveRecord Callbacks
So I added a callback that will call you back
When your callback calls my ...
The AR Callbacks Problem
A Stop Gap Solution
https://github.com/godaddy/activerecord-delay_touching
ActiveRecord::Base.del...
The AR Callbacks Problem
What do we do?
Be more explicit with Service Objects
OptionValueUpdater.new(option_value).call
● ...
My time with Rails is up (Piotr Solnica)
http://solnic.eu/2016/05/22/my-time-with-rails-is-up.html
“People are attracted b...
Spree Wish List
Improve Order Consistency
● Do not trigger order recalculation once complete (or at least be more explicit...
Spree Wish List
Maintain Clear Upgrade Paths
● Semantic versioning
● Non-breaking data migrations
● Upgrades without downt...
Spree Wish List
Preview/Publish Mechanism
● Allow site changes to be staged and viewed before making live
Spree Wish List
Simplify Customization
● Better hooks for overriding flows and replacing features
○ Dependency Injection
○...
Spree Wish List
Support Automated Integrations
● First class application marketplace
○ Engine to plugin extensions without...
Spree Wish List
Keep on Being You!!
● Retain a helpful and collaborative community
● Share and learn from each other
mtucker@godaddy.com
At GoDaddy
we're pulling for small business.
Help us transform the global economy, one entrepreneur at...
@mtazva
mtucker@godaddy.com
Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016
Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016
Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016
Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016
Prochain SlideShare
Chargement dans…5
×

Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016

Presented at the Open Commerce Conference on June 28-29, 2016 in New York City

  • Soyez le premier à commenter

Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016

  1. 1. Powered by
  2. 2. Me llamo Miguel I do this
  3. 3. My Team
  4. 4. “Mermaid Tucker”
  5. 5. #OpenCommerce mtucker@godaddy.com @mtazva
  6. 6. Online Store The Pit of Success
  7. 7. Why Spree? ● Easily Customizable ● Fully Featured ● Existing API ● Highly Extensible ● Great Community!
  8. 8. by developers for developers
  9. 9. Simplifying the Experience ● Grid-based options building ● Simple customization via themes engine ● Automatic PayPal activation ● Automatic domain management ● Automatic SSL management ● Automatic label printing ● Hiding the dirty details
  10. 10. Magnifying the Impact ● Automatic email marketing integration ● Simple and automatic Facebook store ● One-click product reviews engine
  11. 11. SaaS-ification ● Multi-tenancy ● Themes engine ● Internal integrations (single sign-on, domains, others) ● GoDaddy branding
  12. 12. We are the 1%
  13. 13. Making the Sale Get Published
  14. 14. Making the Sale Get Social!
  15. 15. Scaling Spree - Tech Stack ● CentOS 6 ● Ruby 2.2 ● Ceph (internal cloud storage) ● Github / GHE ● Jenkins for CI/CD ● Puppet ● Hadoop ● StatsD and Graphite ● NewRelic ● SumoLogic ● Honeybadger ● Apache Traffic Server 5.3 ● HAProxy 1.5 ● Apache 2.2 ● Unicorn 4.9 ● Rails 4.1 [https://github.com/spree/spree/pull/7192] ● Spree 2.2 ● Bootstrap 3 ● React 0.14 ● Delayed Job ● Memcached ● MySql 5.5 ● Akamai CDN
  16. 16. Scaling Spree - Architecture A10 CommonDB API (4) App (6) MerchantDB ATS HAProxy ATS HAProxy ATS HAProxy ATS HAProxy SSL Termination Redundancy Horizontal Scaling Context-specific data Global metadata Job (4) Memcached (4)
  17. 17. Scaling Spree - Performance ● 10s of thousands of unique live storefronts ● ~1.5M page views per day ● Average page response time ~2.5s ● Average server response ~300ms ● Capable of ~400rps per app server before performance degrades ● >99.99% uptime
  18. 18. The ActiveRecord Callbacks Problem ● Obscure business logic. Explicit => Implicit ● Often have unintended side effects ● Require deep understanding of AR internals ● Can cause a chain reaction performance nightmare
  19. 19. that!
  20. 20. The AR Callbacks Problem Option Type Product Taxonomy Taxon Option Value 1:1 1:M 1:M 1:M Variant 1:M 1:1 parent Variant Product Taxonomy Taxon belongs_to :option_type,touch: true after_touch :touch_all_variants after_touch :touch_all_products belongs_to :product, touch: true after_save :run_touch_callbacks after_touch :touch_taxons after_touch :touch_parent
  21. 21. Yo Dawg I heard you like ActiveRecord Callbacks So I added a callback that will call you back When your callback calls my callback
  22. 22. The AR Callbacks Problem A Stop Gap Solution https://github.com/godaddy/activerecord-delay_touching ActiveRecord::Base.delay_touching do # touch_all_the_things end
  23. 23. The AR Callbacks Problem What do we do? Be more explicit with Service Objects OptionValueUpdater.new(option_value).call ● Explicit, clear business logic ● No hidden side effects ● No magic to understand ● Aggregation of bulk updates
  24. 24. My time with Rails is up (Piotr Solnica) http://solnic.eu/2016/05/22/my-time-with-rails-is-up.html “People are attracted by Rails because it gives you a false sense of simplicity, whereas what really happens is that complexity is being hidden by convenient interfaces. [...] ActiveRecord is just one, representative example, [...].” All Things in Moderation Rails has won: The Elephant in the Room (Fabio Akita) http://www.akitaonrails.com/2016/05/23/rails-has-won-the-elephant-in-the-room “[…] for all intents and purposes, Active Record still does much better than average. But if you're big, you should be careful. That's all.”
  25. 25. Spree Wish List Improve Order Consistency ● Do not trigger order recalculation once complete (or at least be more explicit) ○ Some operations can cause completed orders to be recalculated ● Snapshot product details on orders ○ Modifying product information is reflected in completed orders
  26. 26. Spree Wish List Maintain Clear Upgrade Paths ● Semantic versioning ● Non-breaking data migrations ● Upgrades without downtime
  27. 27. Spree Wish List Preview/Publish Mechanism ● Allow site changes to be staged and viewed before making live
  28. 28. Spree Wish List Simplify Customization ● Better hooks for overriding flows and replacing features ○ Dependency Injection ○ Configurable Service Locators ○ Integration Hooks in Service Objects
  29. 29. Spree Wish List Support Automated Integrations ● First class application marketplace ○ Engine to plugin extensions without development work ○ Oauth-based activation and requirements-based authorization ■ Generates unique, role-based api users Spree :)
  30. 30. Spree Wish List Keep on Being You!! ● Retain a helpful and collaborative community ● Share and learn from each other
  31. 31. mtucker@godaddy.com At GoDaddy we're pulling for small business. Help us transform the global economy, one entrepreneur at a time.
  32. 32. @mtazva mtucker@godaddy.com

×