Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce...
-
Upload
spark-solutions -
Category
Technology
-
view
2.668 -
download
0
Transcript of Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce...
![Page 1: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/1.jpg)
Powered by
![Page 2: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/2.jpg)
Me llamo MiguelI do this
![Page 3: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/3.jpg)
![Page 4: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/4.jpg)
My Team
![Page 5: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/5.jpg)
“Mermaid Tucker”
![Page 6: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/6.jpg)
![Page 7: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/7.jpg)
#[email protected] @mtazva
![Page 8: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/8.jpg)
Online StoreThe Pit of Success
[Powered by
Spree]
![Page 9: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/9.jpg)
Why Spree?
● Easily Customizable
● Fully Featured
● Existing API
● Highly Extensible
● Great Community!
![Page 10: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/10.jpg)
by developersfor developers
![Page 11: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/11.jpg)
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
![Page 12: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/12.jpg)
Magnifying the Impact● Automatic email marketing integration● Simple and automatic Facebook store● One-click product reviews engine
![Page 13: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/13.jpg)
SaaS-ification● Multi-tenancy● Themes engine● Internal integrations (single sign-on, domains, others)● GoDaddy branding
![Page 14: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/14.jpg)
![Page 15: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/15.jpg)
We are the 1%
![Page 16: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/16.jpg)
Making the SaleGet Published
![Page 17: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/17.jpg)
Making the SaleGet Social!
![Page 18: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/18.jpg)
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
![Page 19: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/19.jpg)
Scaling Spree - ArchitectureA10
CommonDB
API(4)
App(6)
MerchantDB
ATS
HAProxy
ATS
HAProxy
ATS
HAProxy
ATS
HAProxy
SSL Termination
Redundancy
Horizontal Scaling
Context-specific dataGlobal metadata
Job(4)
Memcached(4)
![Page 20: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/20.jpg)
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
![Page 21: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/21.jpg)
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
![Page 22: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/22.jpg)
that!
![Page 23: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/23.jpg)
The AR Callbacks Problem
Option Type Product
Taxonomy
Taxon
Option Value1:1 1:M
1:M
1:M
Variant
1:M1:1
parent
Variant
Product
Taxonomy
Taxon
belongs_to :option_type,touch: trueafter_touch :touch_all_variants after_touch :touch_all_produ
cts
belongs_to :product, touch: true
after_save :run_touch_callbacksafter_touch :touch_taxons after_touch :touch_parent
![Page 24: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/24.jpg)
Yo DawgI heard you like ActiveRecord Callbacks
So I added a callback that will call you backWhen your callback calls my callback
![Page 25: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/25.jpg)
![Page 26: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/26.jpg)
The AR Callbacks Problem
A Stop Gap Solutionhttps://github.com/godaddy/activerecord-delay_touching
ActiveRecord::Base.delay_touching do # touch_all_the_thingsend
![Page 27: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/27.jpg)
The AR Callbacks ProblemWhat 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
![Page 28: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/28.jpg)
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.”
![Page 29: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/29.jpg)
Spree Wish ListImprove 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
TIME CHECK
![Page 30: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/30.jpg)
Spree Wish ListMaintain Clear Upgrade Paths● Semantic versioning ● Non-breaking data migrations● Upgrades without downtime
![Page 31: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/31.jpg)
Spree Wish ListPreview/Publish Mechanism● Allow site changes to be staged and viewed before making live
![Page 32: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/32.jpg)
Spree Wish ListSimplify Customization● Better hooks for overriding flows and replacing features
○ Dependency Injection○ Configurable Service Locators○ Integration Hooks in Service Objects
![Page 33: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/33.jpg)
Spree Wish ListSupport 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 :)
![Page 34: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/34.jpg)
Spree Wish ListKeep on Being You!!● Retain a helpful and collaborative community● Share and learn from each other
![Page 35: Michael Tucker, GoDaddy_How GoDaddy used Spree to build their Online Store product @ Open Commerce Conference 2016](https://reader033.fdocuments.us/reader033/viewer/2022061306/58aa71431a28abbc1e8b4e87/html5/thumbnails/35.jpg)
At GoDaddywe're pulling for small business.Help us transform the global economy, one entrepreneur at a time.