mirror of
https://github.com/php/presentations.git
synced 2026-03-23 23:22:22 +01:00
Updates for HHVM/PHP talk for IPC
This commit is contained in:
173
phphhvm-ipc15.xml
Normal file
173
phphhvm-ipc15.xml
Normal file
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<presentation css="10gen-strict.css">
|
||||
<topic>MongoDB</topic>
|
||||
<title>One Extension, Three Engines</title>
|
||||
<event>IPC</event>
|
||||
<location>Munich, Germany</location>
|
||||
<date>Oct 27th, 2015</date>
|
||||
<speaker>Derick Rethans</speaker>
|
||||
<email>derick@mongodb.com</email>
|
||||
<twitter>derickr</twitter>
|
||||
<url>http://derickrethans.nl/talks.html</url>
|
||||
<joindin></joindin>
|
||||
<slide>slides/mongodb/one-ext-two-engines.xml</slide>
|
||||
<slide>slides/mongodb/me.xml</slide>
|
||||
|
||||
<slide>slides/mongodb/1e2e-agenda.xml</slide>
|
||||
<slide>slides/mongodb/1e3e-agenda.xml</slide>
|
||||
|
||||
<!-- HISTORY of the DRIVER -->
|
||||
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
|
||||
|
||||
<slide>slides/mongodb/driver-history-0.8.4.xml</slide>
|
||||
<slide>slides/mongodb/driver-history-0.8.4-2.xml</slide>
|
||||
|
||||
0.9.0 - 5.3 support (may 2009)
|
||||
- does db, cursor and collection classes
|
||||
|
||||
<slide>slides/mongodb/driver-history-0.9.0.xml</slide>
|
||||
|
||||
1.0.0 - sept 2009
|
||||
- the choice to always return arrays is made
|
||||
|
||||
<slide>slides/mongodb/driver-history-1.0.0.xml</slide>
|
||||
<slide>slides/mongodb/driver-history-1.0.0-2.xml</slide>
|
||||
|
||||
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
|
||||
|
||||
<slide>slides/mongodb/driver-history-1.2.8.xml</slide>
|
||||
|
||||
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!
|
||||
|
||||
<slide>slides/mongodb/driver-history-1.3.0.xml</slide>
|
||||
|
||||
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)
|
||||
|
||||
<slide>slides/mongodb/driver-history-1.6.0.xml</slide>
|
||||
|
||||
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)
|
||||
|
||||
<slide>slides/mongodb/driver-current-status.xml</slide>
|
||||
|
||||
<!-- NEW GOALS -->
|
||||
|
||||
- Easier to maintain
|
||||
- Easier to prototype
|
||||
- Support other engines without redoing it all
|
||||
|
||||
<slide>slides/mongodb/new-driver-goals.xml</slide>
|
||||
|
||||
<!-- THE ENGINES -->
|
||||
<slide>slides/mongodb/the-engines.xml</slide>
|
||||
|
||||
<!-- PHP 5 -->
|
||||
<slide>slides/mongodb/engines-php5.xml</slide>
|
||||
|
||||
<!-- HHVM -->
|
||||
<slide>slides/mongodb/engines-hhvm.xml</slide>
|
||||
|
||||
<!-- PHP 7 -->
|
||||
<slide>slides/mongodb/engines-php7.xml</slide>
|
||||
|
||||
|
||||
<!-- NEW ARCHITECTURE -->
|
||||
|
||||
libbson, libmongoc, Hippo, Phongo and Phplib (flip?)
|
||||
Other packages on top (GridFS)
|
||||
Composer
|
||||
|
||||
<slide>slides/mongodb/new-architecture.xml</slide>
|
||||
|
||||
- MongoDB vs Mongo extension
|
||||
|
||||
<slide>slides/mongodb/libbson.xml</slide>
|
||||
<slide>slides/mongodb/libmongoc.xml</slide>
|
||||
|
||||
<slide>slides/mongodb/phongo.xml</slide>
|
||||
<slide>slides/mongodb/new-driver-bc.xml</slide>
|
||||
<slide>slides/mongodb/new-driver-bc2.xml</slide>
|
||||
<slide>slides/mongodb/api-old.xml</slide>
|
||||
<slide>slides/mongodb/api-new.xml</slide>
|
||||
|
||||
<slide>slides/mongodb/hippo.xml</slide>
|
||||
<slide>slides/mongodb/hippo-impl-def.xml</slide>
|
||||
<slide>slides/mongodb/hippo-impl.xml</slide>
|
||||
<slide>slides/mongodb/hippo-impl-2.xml</slide>
|
||||
<slide>slides/mongodb/hippo-vs-phongo.xml</slide>
|
||||
|
||||
<slide>slides/mongodb/api-new.xml</slide>
|
||||
<slide>slides/mongodb/api-phongo.xml</slide>
|
||||
<slide>slides/mongodb/api-hippo.xml</slide>
|
||||
<slide>slides/mongodb/api-phongo-new.xml</slide>
|
||||
<slide>slides/mongodb/api-serialization-spec.xml</slide>
|
||||
|
||||
- PHP 7...
|
||||
|
||||
<slide>slides/mongodb/phongo-php5-7.xml</slide>
|
||||
|
||||
<slide>slides/mongodb/phplib.xml</slide>
|
||||
<slide>slides/mongodb/phplib-usage-2.xml</slide>
|
||||
|
||||
<!-- ISSUES -->
|
||||
|
||||
- APIs changing in Phongo meant that things had to be redone for Hippo
|
||||
- Namespaces for drivers, exception and bson classes
|
||||
|
||||
<slide>slides/mongodb/moving-target.xml</slide>
|
||||
|
||||
HHVM is not mature, and certainly not documented.
|
||||
|
||||
- Slow going, mention the hhvm cookbook
|
||||
- issues with cursor and foreach iteration
|
||||
|
||||
<slide>slides/mongodb/hhvm-maturity.xml</slide>
|
||||
|
||||
<!-- CURRENT STATUS -->
|
||||
|
||||
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)
|
||||
|
||||
<slide>slides/mongodb/new-current-status.xml</slide>
|
||||
<slide>slides/mongodb/new-still-to-do.xml</slide>
|
||||
|
||||
<slide>slides/mongodb/resources.xml</slide>
|
||||
|
||||
|
||||
</presentation>
|
||||
@@ -15,13 +15,13 @@ $doc = [
|
||||
'null' => null,
|
||||
'float' => M_PI,
|
||||
];
|
||||
|
||||
$r = $m->executeInsert( 'demo.test', $doc );
|
||||
|
||||
$bw = new MongoDB\Driver\BulkWrite();
|
||||
$bw->insert( 'demo.test', $doc );
|
||||
$m->executeBulkWrite( 'demo.test', $bw );
|
||||
$q = new MongoDB\Driver\Query( [] );
|
||||
$cursor = $m->executeQuery( 'demo.test', $q );
|
||||
|
||||
foreach ( $cursor->toArray() as $key => $result )
|
||||
foreach ( $cursor as $key => $result )
|
||||
{
|
||||
print_r( $result );
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 9.9 KiB |
@@ -2,9 +2,9 @@
|
||||
<title>Current status</title>
|
||||
|
||||
<list>
|
||||
<bullet>phongo in beta state (1.0.0beta1)<br/>%pecl install mongodb%</bullet>
|
||||
<bullet>hippo in alpha<br/>%https://github.com/mongodb-labs/mongo-hhvm-driver-prototype/releases/tag/1.0alpha1%</bullet>
|
||||
<bullet>phplib in alpha state (0.2.0)<br/>%https://packagist.org/packages/mongodb/mongodb%</bullet>
|
||||
<bullet>phongo has a release candidate<br/>%pecl install mongodb%</bullet>
|
||||
<bullet>hippo has a release candidate<br/>%https://github.com/mongodb-labs/mongo-hhvm-driver-prototype/releases/tag/1.0.0RC1%</bullet>
|
||||
<bullet>phplib in alpha state (1.0.0-alpha1)<br/>%https://packagist.org/packages/mongodb/mongodb%</bullet>
|
||||
</list>
|
||||
|
||||
<image filename="elephpant-beer.jpg"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<title>Phongo</title>
|
||||
|
||||
<list>
|
||||
<bullet>New backwards breaking MongoDB extension for PHP 5.3 and higher</bullet>
|
||||
<bullet>New backwards breaking MongoDB extension for PHP 5.4 and higher</bullet>
|
||||
<bullet>Very minimal API</bullet>
|
||||
<bullet>Meant to be build upon by PHP libraries (like the 0.8.4 driver)</bullet>
|
||||
<bullet>Uses PHP namespaces</bullet>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div effect="fade-in"><blurb>PHP ---5.3--- 5.4 and higher</blurb></div></td>
|
||||
<td><div effect="fade-in"><blurb>Some random version (3.9?)</blurb></div></td>
|
||||
<td><div effect="fade-in"><blurb>HHVM 3.9 and higher</blurb></div></td>
|
||||
<td><div effect="fade-in"><blurb>It's not out yet (Nov 12?)</blurb></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user