e-commerce and mongodb at backcountry.com

41
MONGODB AT BACKCOUNTRY.COM Gustavo Leiva. Engineering Manager @gustavoleiva

Upload: mongodb

Post on 14-Aug-2015

63 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: E-Commerce and MongoDB at Backcountry.com

MONGODB ATBACKCOUNTRY.COMGustavo Leiva. Engineering Manager@gustavoleiva

Page 2: E-Commerce and MongoDB at Backcountry.com

Keypoints

● MongoDB and E-Commerce

● Technology adoption

● Microservices

● Decoupling

Page 3: E-Commerce and MongoDB at Backcountry.com

WHO WE ARE

Page 4: E-Commerce and MongoDB at Backcountry.com

E-Commerce

● Authority, expertise and guidance on outdoor gear, since 1996.

● Started business with open source monolith platform(Perl and PostgreSQL).

● Moved backcountry.com front end to a monolith proprietary enterprise commerce solution on

2012.

● On going effort towards a microservices architecture.

Page 5: E-Commerce and MongoDB at Backcountry.com

How we work

● Distributed teams: United States (Park City, Portland), Costa Rica(San José).

● Agile.

● Believe in innovation.

● Inspire others.

● Prepare for growth.

● Build technology when it makes sense.

Page 6: E-Commerce and MongoDB at Backcountry.com

IT Transformation

2000 2012 2015

Perl, PostgreSQL Oracle ATG, Java NoSQL, JVM languages, Node, Automation and more web frameworks.

Page 7: E-Commerce and MongoDB at Backcountry.com

IT Transformation

● Smaller teams.

● Independent.

● Currently working on increasing automation.

● Organically moving to a microservices architecture.

● Current transition seems to reflect the Conway’s law.

Page 8: E-Commerce and MongoDB at Backcountry.com

COMMERCEPIPELINE

Page 9: E-Commerce and MongoDB at Backcountry.com

The pipeline

Socialize

Partner

Guide

Buy On Board Promote Sell Fulfill Follow up

Page 10: E-Commerce and MongoDB at Backcountry.com

Why MongoDB?

● Simple.

● Flexible.

● Easy to learn. (Quick ramp up with MongoDB U: NodeJS, Java Development)

● Cost effective.

● Fit the use case.

● Our engineers liked it.

● A sense of relief from our former technologies.

● Thumbs up from sys admins and engineers.

Buy On Board Promote Sell Fulfill Follow up

Page 11: E-Commerce and MongoDB at Backcountry.com

Adoption of MongoDB

● Started as part of a prototype application(MEAN stack).

● Suggest and assign work to writers whenever new product content needed to be written.

● Events would be stored and retrieved from MongoDB.

● Still functioning as an active component of content creation process.

● Reduce time where writers are idle.

Buy On Board Promote Sell Fulfill Follow up

Page 12: E-Commerce and MongoDB at Backcountry.com

PROMOTE

Page 13: E-Commerce and MongoDB at Backcountry.com

The Hub

HUB

Buy On BoardPromote Sell Fulfill Follow up

Page 14: E-Commerce and MongoDB at Backcountry.com

The Hub

● Notify of changes in product, price and inventory.

● Single source of truth for systems requesting data.

● Consolidates data that used to be queried from the legacy platform.

● Step towards decoupling and scalability.

Buy On BoardPromote Sell Fulfill Follow up

Page 15: E-Commerce and MongoDB at Backcountry.com

MongoDB and the Hub

APIProduct

Inventory

PriceTopics

Buy On BoardPromote Sell Fulfill Follow up

Page 16: E-Commerce and MongoDB at Backcountry.com

Feeds, the Hub and MongoDB

HUB40% of revenue driven by marketing channels

Buy On BoardPromote Sell Fulfill Follow up

Page 17: E-Commerce and MongoDB at Backcountry.com

Merchandising, Email

Buy On BoardPromote Sell Fulfill Follow up

Page 18: E-Commerce and MongoDB at Backcountry.com

Merchandising, Email

● Removed the need of an engineering team to implement new emails.

● Email objects are stored in MongoDB.

● Eventually sent to the third party provider that takes care of sending the actual email.

● Provided visibility into email traffic activity.

● Extended to cover a generic customer notification concept.

Buy On BoardPromote Sell Fulfill Follow up

Page 19: E-Commerce and MongoDB at Backcountry.com

Merchandising, Email, Data

Buy On BoardPromote Sell Fulfill Follow up

Page 20: E-Commerce and MongoDB at Backcountry.com

SELL

Page 21: E-Commerce and MongoDB at Backcountry.com

Front End Commerce Platform Transformation

Buy On Board Promote Sell Fulfill Follow up

Product CommunityCart &

CheckoutTargeting

Users/Tagging/etc

Oracle

● At the time of adoption of enterprise commerce platform, 2012.

● Rigid release process.

● Felt the pain of a replatform. Technical debt.

● Slowdown on business development.

Page 22: E-Commerce and MongoDB at Backcountry.com

Product

● Created API(Scala, Play) to expose product, category and brand content on the

site.

● MongoDB as product store. Solr as search engine.

● Serves 60% of sites traffic.

Buy On Board Promote Sell Fulfill Follow up

Product Community TargetingCart &

CheckoutUsers/

Tagging/etc

OracleAPI

Page 23: E-Commerce and MongoDB at Backcountry.com

Product

Buy On Board Promote Sell Fulfill Follow up

● products

● categories

● brands

Page 24: E-Commerce and MongoDB at Backcountry.com

Community

● Created API(Play, Scala) to store community contributions: reviews, images, videos,

questions, answers.

● Aggregation pipeline used to optimize product contributions wall and customer’s profile wall.

● Opened potential to extend functionality.

● Removed OOTB(ORM) repository layer queries that impacted performance.

Buy On Board Promote Sell Fulfill Follow up

Product Community TargetingCart &

CheckoutUsers/

Tagging/etc

OracleAPI

Page 25: E-Commerce and MongoDB at Backcountry.com

Community

Buy On Board Promote Sell Fulfill Follow up

● user

● content

Page 26: E-Commerce and MongoDB at Backcountry.com

Targeting

● Targeting engine from commerce platform exposed as a service.

● Found under utilized personalization capabilities.

● Performance hit from existing overhead to resolve a problem that was simple in the majority of

cases.

Buy On Board Promote Sell Fulfill Follow up

Product Community TargetingCart &

CheckoutUsers/

Tagging/etc

OracleAPI

Page 27: E-Commerce and MongoDB at Backcountry.com

MongoDB and the FE Commerce Platform

ProductPromotional Content

Community

Buy On Board Promote Sell Fulfill Follow up

Page 28: E-Commerce and MongoDB at Backcountry.com

Differentiate, Partner

● Experience provided enough confidence to start adding differentiation features.

● Fit data by profile and community review.

● UI aggregation layer for the mobile app.

● Potential for Partnerships.

Buy On Board Promote Sell Fulfill Follow up

Page 29: E-Commerce and MongoDB at Backcountry.com

Partner

● MongoDB as storage and aggregator of strava

data(NodeJS).

● Assign credits based on historical information of activities

in a time range.

Buy On Board Promote Sell Fulfill Follow up

Page 30: E-Commerce and MongoDB at Backcountry.com

Partner

Buy On Board Promote Sell Fulfill Follow up

Sync up(10K)

New accounts2K

Day 1

Page 31: E-Commerce and MongoDB at Backcountry.com

FACING THE CUSTOMERS

Page 32: E-Commerce and MongoDB at Backcountry.com

Towards a cost effective commerce model

● Effort on decoupling makes the company less dependant on a commerce solution.

● Use the commerce platform for cart & checkout operations, decouple the other pieces.

● Non cart and checkout operations can be fully executed outside the commerce platform.

● Change pricing model to charge by requests rather than cores, better fit for scalability.

Buy On Board Promote Sell Fulfill Follow up

Page 33: E-Commerce and MongoDB at Backcountry.com

Towards a cost effective commerce model

● Adding more data centers would have significantly increased operational costs in terms of

commerce platform licensing.

● MongoDB reliant APIs plus work on caching strategies(Varnish, Redis) allow us to grow in

terms of traffic, without hitting our pricing model requests threshold.

● We’ll be able to use the commerce platform for what it does best.

Buy On Board Promote Sell Fulfill Follow up

Page 34: E-Commerce and MongoDB at Backcountry.com

Q4 at Backcountry.com

Buy On Board Promote Sell Fulfill Follow up

Jan Dec

$

Page 35: E-Commerce and MongoDB at Backcountry.com

Q4 at Backcountry.com, 2013

● Struggled with stability, overhead with monolith enterprise solution.

● Delegated too many tasks to the commerce platform.

● Engineering spent long hours trying to fix things.

● Q4 is the true final test for any technology at backcountry.com

Buy On Board Promote Sell Fulfill Follow up

Page 36: E-Commerce and MongoDB at Backcountry.com

Q4 at Backcountry.com, 2014

● Commerce platform took less tasks.

● It was the first Q4 of several MongoDB reliant APIs.

● No major issues were presented.

● Best Q4 remembered, in terms of stability and Q4 preparation work.

● Company hit the revenue goal.

Buy On Board Promote Sell Fulfill Follow up

Page 37: E-Commerce and MongoDB at Backcountry.com

Q4 at Backcountry.com, 2014

Buy On Board Promote Sell Fulfill Follow up

Page 38: E-Commerce and MongoDB at Backcountry.com

CONCLUSIONS

Page 39: E-Commerce and MongoDB at Backcountry.com

Challenges

● Keeping schemas clean. 20% Backlog.

● Making sure the use case is a fit. Architectural Review Board.

● Ownership: Owning the stack vs DBA delegation.

● Risk Management.

● Business traction.

Page 40: E-Commerce and MongoDB at Backcountry.com

What worked

● Fit a variety of use cases.

● Served a diverse amount of traffic.

● Allowed fast adoption and quick development.

● Key technology on the decoupling effort and the strategy around being cost effective.

● Services on top of MongoDB.

● Transparency on DB status with MMS.

Page 41: E-Commerce and MongoDB at Backcountry.com

THANK YOU