+ All Categories
Home > Documents > MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"!...

MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"!...

Date post: 27-May-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
33
@ @nathenharvey Nathen Harvey
Transcript
Page 1: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

@  

@nathenharvey  Nathen  Harvey  

Page 2: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Hello!  

!  Nathen  Harvey  !  Web  Opera4ons  at  CustomInk  

!  [email protected]  !  @nathenharvey  

!  Organize  MongoDC  Meetups  !  See  you  there  next  month!  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 3: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Thanks  for  aFending  

!  In  the  other  track  !  Eliot  Horowitz,  CTO  &  Co-­‐Founder,  10gen  

!  Schema  Design  at  Scale  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 4: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

CustomInk  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 5: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

CustomInk  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 6: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

CustomInk  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 7: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

CustomInk  Customers  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 8: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

CustomInk  Customers  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 9: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

CustomInk  Customers  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 10: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

CustomInk  Customers  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 11: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Customer  Reviews  

Nathen  Harvey  Nathen  Harvey  

Page 12: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

CustomInk  Technology  

!  Divide  our  technology  into  two  classes:  !  ECommerce  –  pre-­‐checkout  and  shopping  cart  

!  Opera4ons  Technology  –  post-­‐check-­‐out,  fulfillment,  etc.  

!  Ruby  on  Rails  !  With  some  legacy  Java  

!  Approximately  30  different  applica4ons  running  in  produc4on  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 13: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

CustomInk  Databases  

!  Primarily  Oracle  !  Was  the  “right”  choice  11  years  ago  when  the  company  was  started  

!  No  longer  a  good  solu4on  for  us  !  MySQL  

!  Percona  Server  with  XtraDB  !  MongoDB  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 14: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

MongoDB  

!  Champions  !  Easy  to  set-­‐up  and  configure  !  “Greenfield”  projects  with  loose  schema  defini4ons  

!  Makes  development  easier  and  developers  happy  !  Limited  amount  of  4me  between  releases  

!  Challenges  !  No  prior  experience  with  running  produc4on  !  Limited  amount  of  4me  between  releases  

!  Unproven  solu4on  

Nathen  Harvey  Nathen  Harvey  

Page 15: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Problem  

!  Complex  Produc4on  Environments  

!  Orchestrated  Services  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 16: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Why  Mongo?  

!  Introduces  company  to  MongoDB  !  Easily  to  modify  document  structure  

!  Lightweight  development  

!  Easy  to  install  and  deploy  !  Capped  Collec4ons  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 17: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Central  Logger  

!  Subclasses  Buffered  Logger  !  It’s  a  gem  loaded  into  Rails  applica4ons  as  a  Rail4e  

!  Captures  useful  metadata  

!  Use  the  MongoDB  Ruby  Driver  

!  hFp://github.com/customink/central_logger  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 18: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Central  Logger  

Page 19: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Record  Structure  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 20: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Log  Viewer  

Page 21: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Product  Catalog  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 22: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Why  Mongo?  

!  Frequently  changing  requirements  !  GridFS  !  Wide  variety  of  products  with  varied  characteris4cs  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 23: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Case  for  Document-­‐based  Schema  

@nathenharvey  Nathen  Harvey  

Page 24: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Applica4on  Architecture  

!  Rails  applica4on  for  managing  the  product  catalog  

!  Writes  to  MongoDB  as  it’s  database  

!  U4lizes  GridFS  for  storing  files  !  Uses  Mongoid  as  the  ODM  

@nathenharvey  Nathen  Harvey  

Page 25: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Implementa4on  Flow  

Oracle   MongoDB  

ECommerce  Applica4on  

Catalog  Applica4on  

@nathenharvey  Nathen  Harvey  

Page 26: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Next  Steps  

!  Con4nue  to  adopt  MongoDB  in  the  Opera4ons  Technology  applica4ons  

!  Begin  using  MongoDB  with  ECommerce  applica4ons  !  Repor4ng  artwork  usage  !  Capturing  JavaScript  logs  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 27: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Automated  Deployment  

!  Chef  is  an  open  source  systems  integra4on  framework  built  to  bring  the  benefits  of  configura4on  management  to  your  en4re  infrastructure.  

!  We  use  Chef  to  manage  our  infrastructure  and  deploy  MongoDB  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 28: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

MongoDB  Cookbook  

!  Use  Vagrant  and  VirtualBox  as  the  development  environment  for  our  Cookbooks  

!  Cookbook  shared  on  Github  and,  soon,  OpsCode  Community  Site.  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 29: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Monitoring  Produc4on  

!  hFp://github.com/mzupan/nagios-­‐plugin-­‐mongodb  

Page 30: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Monitoring  Produc4on  

!  Monit  

Page 31: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Lessons  Learned  

!   Capped  Collec4ons  !   Tes4ng  replica  set  failover  !   Schema  free  !=  design  free  !   JSON  in  the  DB,  JQuery  in  the  browser  ==  happy  developers  

!  mongo_import  could  not  handle  carriage  returns  in  CSV  files  

!   Unserializable  data  types  !   Data  transforma4ons  on  a  large  dataset  s4ll  painful  !   Unless  you’re  sharding,  map  reduce  probably  slower  and  more  complex  than  what  you’re  used  to  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 32: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

MongoDC  Meetup  

!  Join  fellow  MongoDB  enthusiasts  for  a  monthly  meetup  

!  Mee4ngs  are  held  at  CustomInk  in  McLean,  VA  

!  hFp://www.meetup.com/Washington-­‐DC-­‐MongoDB-­‐Users-­‐Group/  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  

Page 33: MongoDB at CustomInk - Meetupfiles.meetup.com/1742411/MongoDB_at_CustomInk.pdfThanks"for"aending"! In"the"other"track"! EliotHorowitz,"CTO"&"CoLFounder,"10gen"! SchemaDesign"atScale"

Thank  You!  

!  Nathen  Harvey  !  Web  Opera4ons  at  CustomInk  

!  [email protected]  !  @nathenharvey  

!  Organize  MongoDC  Meetups  !  See  you  there  next  month!  

@nathenharvey  Nathen  Harvey   @nathenharvey  Nathen  Harvey  


Recommended