cvs: presentations /slides/srm banana.png binsearch.class.php compiling.xml configure-and-run.xml future3.xml moving.xml sourcelayout.xml
srm-design.png

From: Date: Sun, 03 Oct 2004 13:45:45 +0000
Subject: cvs: presentations /slides/srm banana.png binsearch.class.php compiling.xml configure-and-run.xml future3.xml moving.xml sourcelayout.xml
srm-design.png
Groups: php.pres 
Request: Send a blank email to pres+get-1075@lists.php.net to get a copy of this message
derick Sun Oct 3 09:45:45 2004 EDT Added files: /presentations/slides/srm banana.png binsearch.class.php compiling.xml configure-and-run.xml future3.xml moving.xml sourcelayout.xml srm-design.png Log: - Added new slides and pictures for the SRM talk. http://cvs.php.net/co.php/presentations/slides/srm/binsearch.class.php?r=1.1&p=1 Index: presentations/slides/srm/binsearch.class.php +++ presentations/slides/srm/binsearch.class.php <?php class node { var $key; var $value; var $left; var $right; } class binsearch { var $root = NULL; function binsearch($elements) { foreach ($elements as $key => $value) { $this->add_value($key, $value); } echo "<pre>", substr(var_export($this->root, true), 0, 190), "\n...", substr(var_export($this->root, true), -40), "</pre>"; } function add_value($key, $value) { $ptr = &$this->root; while ($ptr != NULL) { if ($key < $ptr->key) { $ptr = &$ptr->left; } else { $ptr = &$ptr->right; } } $ptr = new node; $ptr->key = $key; $ptr->value = $value; $ptr->left = NULL; $ptr->right = NULL; } function get_value($key) { $ptr = &$this->root; while ($key != $ptr->key && $ptr != NULL) { if ($key < $ptr->key) { $ptr = &$ptr->left; } else { $ptr = &$ptr->right; } } return $ptr ? $ptr->value : FALSE; } } ?> http://cvs.php.net/co.php/presentations/slides/srm/compiling.xml?r=1.1&p=1 Index: presentations/slides/srm/compiling.xml +++ presentations/slides/srm/compiling.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Compiling</title> <subtitle>Three Parts: Daemon, PHP Client and PHP SAPI</subtitle> <blurb>Daemon:</blurb> <example><![CDATA[$ ./configure $ make $ sudo make install]]></example> <break/> <blurb>SAPI for PHP:</blurb> <example><![CDATA[$ cd php-4.3.7-sapi $ ./configure --with-srm-sapi --disable-cli --disable-pear --with-srm $ make clean $ rm ext/srm/*.o $ rm ext/srm/*.lo $ rm sapi/srm/*.o $ rm sapi/srm/*.lo $ make $ sudo make install-sapi]]></example> <break/> <blurb>Client in PHP:</blurb> <example><![CDATA[$ cd php-4.3.7 $ ../configure --with-srm ..other options.. $ make clean $ rm ext/srm/*.o $ rm ext/srm/*.lo $ rm sapi/srm/*.o $ rm sapi/srm/*.lo $ make $ sudo make install]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/srm/configure-and-run.xml?r=1.1&p=1 Index: presentations/slides/srm/configure-and-run.xml +++ presentations/slides/srm/configure-and-run.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Configuring and Running SRM</title> <blurb>/etc/srm.ini:</blurb> <example><![CDATA[modules { path = "/usr/local/srm/libexec/"; load "php4"; } banana { class_path = "/usr/local/srm/banana"; function_library = "/usr/local/srm/banana/lib/library.php"; } ]]></example> <break lines="4"/> <blurb>Running the daemon:</blurb> <example><![CDATA[Usage: srmd [-S] [-L] [-X] [-v|-V|-h] Options: -S Disable signal handling -L Log to screen instead of the logfile -X Do not fork into background -v Display version information and exit -V Display detailed version information and exit -h Display this help message and exit ]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/srm/future3.xml?r=1.1&p=1 Index: presentations/slides/srm/future3.xml +++ presentations/slides/srm/future3.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Future</title> <list fontsize="5em"> <bullet>Periodic calling of functions</bullet> <bullet>Support for PHP 5 / Zend Engine 2 (exceptions...)</bullet> <bullet>Automatic saving of state</bullet> <bullet>ACLs to Bananas</bullet> <bullet>Load balancing</bullet> <bullet>...</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/srm/moving.xml?r=1.1&p=1 Index: presentations/slides/srm/moving.xml +++ presentations/slides/srm/moving.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Moving Objects</title> <blurb fontsize="3em">foo.class.php:</blurb> <example fontsize="2em"><![CDATA[<?php class foo { var $bar = ''; function foo() { $this->bar = 'foo'; return func_get_args(); } function echo_bar() { echo $this->bar; } } ?>]]></example> <break lines="2"/> <blurb fontsize="3em">Script (objmove.php):</blurb> <example fontsize="2em"><![CDATA[<?php include '/usr/local/srm/banana/lib/foo.class.php'; $f = new foo; $s = new SRM('127.0.0.1', 7777); $f = new SRMApp($s, $f, 'key2'); var_dump($f->foo(1, 2, 'bar', 3, 4)); /* Properties don't work yet */ echo $f->bar; ?>]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/srm/sourcelayout.xml?r=1.1&p=1 Index: presentations/slides/srm/sourcelayout.xml +++ presentations/slides/srm/sourcelayout.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Compiling</title> <subtitle>Setting up the sources</subtitle> <blurb>Download sources:</blurb> <example><![CDATA[$ mkdir -p /dat/dev/php/srm $ cd /dat/dev/php/srm $ wget http://www.php.net/distributions/php-4.3.7.tar.bz2 $ cvs -d :pserver:srmread@cvs.xdebug.org:/repository login Password: srmread $ cvs -d :pserver:srmread@cvs.xdebug.org:/repository co srm $ cvs -d :pserver:srmread@cvs.xdebug.org:/repository co sapi_srm $ cvs -d :pserver:srmread@cvs.xdebug.org:/repository co php_srm]]></example> <break/> <blurb>Preparing sources:</blurb> <example><![CDATA[$ tar -xvjf php-4.3.7.tar.bz2 $ cp -R php-4.3.7 php-4.3.7-sapi $ cd srm $ ./buildconf $ cd php-4.3.7-sapi/sapi $ ln -s ../../sapi_srm srm $ cd ../ext $ ln -s ../../php_srm srm $ cd .. $ rm configure && ./buildconf $ cd ../php-4.3.7/ext $ ln -s ../../php_srm srm $ cd .. $ rm configure && ./buildconf $ cd ..]]></example> </slide>

« previous php.pres (#1075) next »