$30 off During Our Annual Pro Sale. View Details »

Five Years of Beta

Five Years of Beta

Presented July 23, 2016 at Symfony Catalunya: https://joind.in/talk/081df

Jeremy Mikola

July 23, 2016
Tweet

More Decks by Jeremy Mikola

Other Decks in Programming

Transcript

  1. Five Years of Beta
    Jeremy Mikola
    @jmikola

    View Slide

  2. A little about myself

    View Slide

  3. Some time ago, I talked about this…

    View Slide

  4. tl;dr

    View Slide

  5. This is a story about Doctrine MongoDB ODM

    View Slide

  6. From the other side

    View Slide

  7. ● Object Relational Mapper (ORM)
    ● Database Abstraction Layer (DBAL)
    ● Object Document Mappers (ODMs)
    ○ MongoDB
    ○ PHPCR
    ○ CouchDB
    ○ OrientDB
    ● MongoDB Abstraction Layer
    ● Common
    ○ Annotations
    ○ Collections
    ○ Lexer
    ● Cache
    ● Migrations
    ● Framework integrations
    ○ Symfony bridge and bundles
    ○ Zend Framework modules
    What (and who) is Doctrine?

    View Slide

  8. What is MongoDB?
    ● Open-source document database
    ○ Replication and sharding
    ○ Web scale™
    ● Cloud services
    ○ Monitoring and backup
    ○ Operations management
    ○ Database as a Service (DBaaS)
    ● Integrations
    ○ Hadoop
    ○ Spark
    ○ BI Connector (SQL)
    ● Drivers
    ○ PHP, HHVM, and many other
    languages

    View Slide

  9. Let’s go back in time…

    View Slide

  10. View Slide

  11. Who was using Symfony back then?

    View Slide

  12. OpenSky faced an architectural challenge
    ● Encountered difficulty scaling Magento
    ○ Multi-tenant deployment with hundreds of stores
    ● Realized the need for a bespoke application
    ○ Move Magento behind a service layer during transition
    ○ Slowly migrate away from its EAV database model
    ● Considered the very latest technologies
    ○ PHP 5.3
    ○ Lithium
    ○ Symfony 2
    ○ Zend Framework 2
    ○ MongoDB

    View Slide

  13. Symfony Live Paris 2011

    View Slide

  14. Symfony Live Paris 2011

    View Slide

  15. Long before Composer

    View Slide

  16. install_vendors.sh

    View Slide

  17. update_vendors.sh

    View Slide

  18. Active Record

    View Slide

  19. Data Mapper

    View Slide

  20. View Slide

  21. These guys had an idea

    View Slide

  22. Why don’t we create an ODM for MongoDB?
    ● Port essential ORM functionality
    ○ Class metadata
    ○ Unit of work
    ○ Lifecycle events
    ○ Persistence
    ○ Repositories
    ● Limit the feature scope
    ○ Database abstraction layer
    ○ Sharding support
    ○ Migrations
    ○ Caching

    View Slide

  23. View Slide

  24. 2010 – 2011

    View Slide

  25. 2012 – 2014

    View Slide

  26. 2015 – present

    View Slide

  27. Why did this take
    five years?

    View Slide

  28. Keeping up with the flow

    View Slide

  29. ● Maintaining compatibility
    ○ MongoDB server
    ○ Doctrine Common
    ○ Framework integrations
    ○ “Gedmo” Doctrine extensions
    ● Community support
    ○ Usage questions
    ○ Pull requests
    ○ Bug reports
    ● Security vulnerabilities
    Never-ending todo list

    View Slide

  30. View Slide

  31. View Slide

  32. Watch out for
    feature creep

    View Slide

  33. Ever-growing wish list
    ● Requested ORM features
    ○ Repository factories
    ○ Query filters
    ○ Criteria API
    ○ Result caching
    ● New ODM features
    ○ Sharding
    ○ Geo-spatial queries
    ○ Aggregation builder
    ● Refactoring
    ● PHP 7 support

    View Slide

  34. View Slide

  35. View Slide

  36. View Slide

  37. Waiting to merge pull requests

    View Slide

  38. Perfectionism vs.
    pragmatism

    View Slide

  39. Milestones should not have
    an open door policy

    View Slide

  40. View Slide

  41. Poppin’ tags

    View Slide

  42. View Slide

  43. Semantic versioning
    Major: BC breaks
    Minor: New features
    Patch: Bug fixes

    View Slide

  44. Semantic versioning
    Major: BC breaks
    Minor: New features
    Patch: Bug fixes
    Pre-release: Loophole!

    View Slide

  45. View Slide

  46. View Slide

  47. Find a balance

    View Slide

  48. Open-source can be
    a full-time job

    View Slide

  49. View Slide

  50. View Slide

  51. View Slide

  52. View Slide

  53. Becoming overwhelmed

    View Slide

  54. Abandoned projects

    View Slide

  55. How did I end up here?

    View Slide

  56. /ping @jwage
    /ping @jwage
    /ping @jwage
    ...

    View Slide

  57. View Slide

  58. View Slide

  59. If you look around and can’t
    find the leader of your local
    user group… guess what?
    You are it.
    ― Cal Evans

    View Slide

  60. Open-source should be
    a team effort

    View Slide

  61. ORM development over time

    View Slide

  62. View Slide

  63. View Slide

  64. View Slide

  65. View Slide

  66. View Slide

  67. View Slide

  68. Cultivate and encourage
    your volunteers

    View Slide

  69. Fast forward a few months...

    View Slide

  70. View Slide

  71. View Slide

  72. View Slide

  73. View Slide

  74. These guys closed the gap

    View Slide

  75. View Slide

  76. Where do we go
    from here?

    View Slide

  77. View Slide

  78. View Slide

  79. View Slide

  80. View Slide

  81. View Slide

  82. On the road to 2.0.0
    ● Remove deprecated or problematic APIs
    ○ YAML driver
    ○ requireIndexes
    ● Behavioral changes
    ○ Collection strategies
    ○ Embedded documents
    ● Internal refactoring
    ○ Change set calculation
    ○ Class metadata
    ● Direct PHP 7 support
    ○ Build upon the new MongoDB driver (ext-mongodb)

    View Slide

  83. 2015 – present

    View Slide

  84. See you in another five years…

    View Slide

  85. Photo Credits
    ● http://octodex.github.com
    ● http://www.mongodb-is-web-scale.com/
    ● http://shirt.woot.com/offers/it-came-out-of-nowhere
    ● http://phicenter.org/wp-content/uploads/2012/08/stork_baby_delivery_720x540.jpg
    ● https://livingstills.tumblr.com/post/113724523047
    ● http://www.donatoart.com/portraits/cartographer.html
    ● http://logisticalfictions.tumblr.com/post/86099686495/before-a-later-film-revealed-its-boring-mundanity
    ● http://www.reinventioninc.com/wp-content/uploads/2013/09/iStock_000008468780Small-e1380565027473.jpg
    ● http://giphy.com/gifs/thegoodfilms-cinemagraph-thegoodfilms-forrest-gump-JjLylCKqqQs5q
    ● http://giphy.com/gifs/cinemagraph-max-fury-xme2XN3AzQOEU
    ● http://dream-recover-live.blogspot.com.es/2013/05/just-keep-swimming.html
    ● http://i.huffpost.com/gen/1729387/images/o-SHARK-ATTACK-facebook.jpg
    ● https://twitter.com/kizmarh/status/553141889541877760
    ● http://www.cartoonistgroup.com/properties/lester/art_images/cg56ea24513d0c7.jpg
    ● http://cdn.shopify.com/s/files/1/1067/0834/products/velvet_rope_dude_1024x1024.jpg
    ● https://speaktoall.files.wordpress.com/2013/03/macklemore-thrift-shop-artwork.jpg
    ● http://tkirda.github.io/slides-modern-web-tools/resources/images/semver.png
    ● http://static.neatorama.com/images/2014-04/The-Legend-of-Hodor-l.jpg
    ● https://angeliquepanagos.com/wp-content/uploads/2015/08/balance.jpg
    ● http://latestcalendar.weebly.com/uploads/4/2/7/1/42714133/8676421_orig.jpg

    View Slide