MongoDB
One Extension, Three Engines
PHP NorthWest
Manchester, UK
Oct 3rd, 2015
Derick Rethans
derick@mongodb.com
derickr
http://derickrethans.nl/talks.html
https://joind.in/15427
slides/mongodb/one-ext-two-engines.xml
slides/mongodb/me.xml
slides/mongodb/1e2e-agenda.xml
slides/mongodb/1e3e-agenda.xml
first driver (0.8.4) april 2009
- used resources and classes (for types code/date/id/regex/bindata only)
- only very basic crud operations:
static function_entry mongo_functions[] = {
PHP_FE( mongo_connect , NULL )
PHP_FE( mongo_close , NULL )
PHP_FE( mongo_remove , NULL )
PHP_FE( mongo_query , NULL )
PHP_FE( mongo_insert , NULL )
PHP_FE( mongo_batch_insert , NULL )
PHP_FE( mongo_update , NULL )
PHP_FE( mongo_has_next , NULL )
PHP_FE( mongo_next , NULL )
PHP_FE( mongo_gridfs_init , NULL )
PHP_FE( mongo_gridfs_store , NULL )
PHP_FE( mongo_gridfile_write , NULL )
{NULL, NULL, NULL}
- many existing functionality through PHP based classes
slides/mongodb/driver-history-0.8.4.xml
slides/mongodb/driver-history-0.8.4-2.xml
0.9.0 - 5.3 support (may 2009)
- does db, cursor and collection classes
slides/mongodb/driver-history-0.9.0.xml
1.0.0 - sept 2009
- the choice to always return arrays is made
slides/mongodb/driver-history-1.0.0.xml
slides/mongodb/driver-history-1.0.0-2.xml
nov 2011 - I start helping out
jan 2012 - Hannes does the odd patch
feb 2012 - Kristina retires - 1.2.8
by now, we don't rely on PHP classes at all anymore
slides/mongodb/driver-history-1.2.8.xml
jun 2012 - Hannes starts helping out properly
aug 2012 - merge in new connection handling (no more connection pools) 1.3.0alpha1
- we start using sane branches with git
sep 2012 - jeremy starts doing the odd patches
nov 2012 - 1.3!
slides/mongodb/driver-history-1.3.0.xml
releases now come close to MongoDB server releases
1.4 ssl support may 2013 (2.4)
may 2013 - Jeremy starts helping out properly
1.5 sasl support, command cursors apr 2014 (2.6)
1.6 rewritten cursor support. MONGO_METHOD refactoring / MongoDB 3.0 support jan 2015 (3.0)
slides/mongodb/driver-history-1.6.0.xml
That much for history, the current state of the driver is:
- Three guys working on it
- It supports everything up to MongoDB 3.0
- There are some... issues:
- GridFS
- Some interesting design choices (array/object output)
slides/mongodb/driver-current-status.xml
- Easier to maintain
- Easier to prototype
- Support other engines without redoing it all
slides/mongodb/new-driver-goals.xml
slides/mongodb/the-engines.xml
slides/mongodb/engines-php5.xml
slides/mongodb/engines-hhvm.xml
slides/mongodb/engines-php7.xml
libbson, libmongoc, Hippo, Phongo and Phplib (flip?)
Other packages on top (GridFS)
Composer
slides/mongodb/new-architecture.xml
- MongoDB vs Mongo extension
slides/mongodb/libbson.xml
slides/mongodb/libmongoc.xml
slides/mongodb/phongo.xml
slides/mongodb/new-driver-bc.xml
slides/mongodb/new-driver-bc2.xml
slides/mongodb/api-old.xml
slides/mongodb/api-new.xml
slides/mongodb/hippo.xml
slides/mongodb/hippo-impl-def.xml
slides/mongodb/hippo-impl.xml
slides/mongodb/hippo-impl-2.xml
slides/mongodb/hippo-vs-phongo.xml
slides/mongodb/api-new.xml
slides/mongodb/api-phongo.xml
slides/mongodb/api-hippo.xml
slides/mongodb/api-phongo-new.xml
slides/mongodb/api-serialization-spec.xml
- PHP 7...
slides/mongodb/phongo-php5-7.xml
slides/mongodb/phplib.xml
slides/mongodb/phplib-usage-2.xml
- APIs changing in Phongo meant that things had to be redone for Hippo
- Namespaces for drivers, exception and bson classes
slides/mongodb/moving-target.xml
HHVM is not mature, and certainly not documented.
- Slow going, mention the hhvm cookbook
- issues with cursor and foreach iteration
slides/mongodb/hhvm-maturity.xml
Phongo in alpha (0.6.3)
Hippo in pre-alpha (but you can do all basic ops)
phplib (as mongodb/mongodb) on packagist: https://packagist.org/packages/mongodb/mongodb (0.2.0)
slides/mongodb/new-current-status.xml
slides/mongodb/new-still-to-do.xml
slides/mongodb/resources.xml