1 / 26

ZendCon 2008

ZendCon 2008. Or: How I learned to stop worrying and love the PHP. Keynote. Many companies replacing Java with PHP Zero9 Orange UK (Telecom) BNP Paribas (French Bank) IGN Yahoo DFW Airport. New stuff from Zend Framework Cert. AppCelerator Magento(ecommerce) Zend Studio 6.1

Download Presentation

ZendCon 2008

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ZendCon 2008 Or: How I learned to stop worrying and love the PHP.

  2. Keynote • Many companies replacing Java with PHP • Zero9 • Orange UK (Telecom) • BNP Paribas (French Bank) • IGN • Yahoo • DFW Airport

  3. New stuff from Zend Framework Cert. AppCelerator Magento(ecommerce) Zend Studio 6.1 Partnership w/ Adobe Adobe => Flex Zend Studio PHPUnit (testing) Flex AMF (Flash ActionScript) Dojo (javascript components/widgets)

  4. Join-Fu • Slides in X drive

  5. Analysis @ Ning • Tools • Oprofile • Dtrace extension • System tap • www.sklar.com/blog/ • Slides on X:

  6. PECL Picks (PHP Extens.) • Opcode Caching • APC • Memcached • Image Manipulation • Imagick • Curl Replacement • Pecl_Http • Upload Progress - UploadProgress

  7. PDF – PDF, Haru • Version Control – svn • Database – PDO*, PDO_User (netezza?) • I18n – Translit • Diffs – xdiff • Search – Sphinx • Doing “bad” things • Runkit, funcall, intercept, operator • Type Hinting – spl_types • Params - params

  8. Debugging – Xdebug • Language Embedding • Java, Lua, Perl, Python • Other • Ssh2 • AMF • Elizabethmariesmith.com • Slides on X:

  9. Knight Rider Methodology • Eli White • Tripadvisor, travelpod, eliw.com • All about the tools • Editor – notepad, studio, ide, etc… • Profiling – APD, wincachegrind, webgrind, xdebug • Load testing – http_load, siege, apachebench

  10. Performance – APC, memcached, gearman (batch processing) • Code Libraries – Pecl, pear, js – jquery etc • Debugging – xdebug, dbg, zstudio, apd, firebug, dev toolbar • Testing – simpletest, phpt, phpunit, selenium (js) • Multi-tier servers – Dev, Integration, Testing, Staging, Production • Errors – E_ALL && E_STRICT

  11. Version Control – SVN, CVS, GIT • Lint (suspicious code) – php –l, phplint • Code Sniff – check coding standards • GUIs – DB – aqua data studio, squirrelsql; version control – subcommander, smartsvn • Little things (commands) – rsync, grep, find, sed, cut • Hardware – acquire what will help • Social networking – Community!

  12. Zend Studio Secrets • F-Keys • Ctrl-f8 = switch persepctives • Ctrl-f7 = switch panes • Ctrl-f6 = switch files, alt-left, alt-right • Ctrl-m = max/minimize panes • Ctrl-l = show shortcuts • Ctrl-r = open file • Ctrl-k = show next find • Can be config’d to show white space • Wizards – PHPUnit

  13. Rich UIs w/ ZF + Dojo • Webinar @ http://www.zend.com/en/resources/webinars/ • Matthew Weier O’Phinney

  14. Keynote Wednesday • Magento • OOP • Zend Framework • 170 Extensions • Powering Poster.com, fiesta bowl • Modular, flexible • Connect – extension site • Customize user experience • Iphone optimized • Layered Navigation • Ratings, reviews, tags, feeds • Call center functionality • Promotion engine

  15. ZF – Less Training • NewBSD License • Design packages (themes) • Pear channel • SOAP, XMLRPC APIs

  16. Web Services w/ Z Frame. • Matthew Turling – ishouldbecoding.com • HTTP_Auth • Zend_Server_Interface • Zend_Server_Reflection • Zend_Server_Abstract • REST • Zend_Rest_Server – not ideal • Zend_Rest_Client • Book: Restufl web services, isbn: 059652…

  17. Controller • contextSwitchHelper • Content Negotiation • XMLRPC • Zend_XmlRpc_Server, _Request, _Response, _Server_Fault, _Server_Cache (not ready), _Client, _Client_Serverproxy (allows xmlrpc as native php object) • Boxcarring – allow multiple calls on single request • JSON-RPC • Zend_Json_Server, _Server_smd, _Server_Request, _Server_error • SOAP • Zend_Soap_Server • Verbose, enumerators, complex, namespaces, user-defined data types

  18. RIA w/ ZF + Flex + Air • John Coggeshall – Automotive Computer Services • Air – Allows access to local services on client • Zend Studio • Flex Builder Plugin • Log_Watcher plugin • Adobe Actionscript3 + Flex w/ PureMVC extension (puremvc.org)

  19. Enterprise PHP • Ivo Jansch • Know customer wants vs needs • Wireframes – Axure (www.axure.com) $500 for 5 seats • CruiseControl, PHPUnderControl

  20. Scaling Mozilla’s Websites • Laura Thomson • Mozilla.com runs on Drupal • Services – Bouncer (load balancing) • Addons.mozilla.com = “AMO” • 72M hits, 4M page views, 1M user sessions • Runs on CakePHP • Infrastructure • 3 datacenters (San Jose, Amsterdam, China) • Net Scaler hardware (Citrix) • Web Servers -> memcached, db cluster (my,pg) • 12 nodes each for static, dynamic

  21. Scaling SUMO (support.mozilla.org) • KB, Forum, wiki (tikiwiki) • Initially only 5 reqs/second • Architecture analysis • Load Tests • Profiling (xdebug + kcachegrind) • 270 Queries / page load! • Reduce includes • Now up to 12 reqs/second • DB • Caching, move to innodb • Fix slow queries, add indexes • Now down to 19 queries/page • Duplication – Send selects to slaves, other to master • Logic to make post-update selects on master • Memcached – Whole-page, sessions

  22. Scaling SUMO contd. • Use cron jobs instead of rolling up on certain pages • Load Testing (now at 22 reqs/sec) • Millenium • Log replay • https://svn.mozilla.org/projects/webtest • Peak Download Day Stats • 14Gb/s • 2Gb/s web traffic • 300x spike • Turned off AMO to help • One net scaler failed

  23. Testing With Selenium • Stefan Priebsch • Testing – Unit, system, acceptance, integration, performance, load, usability, security • Selenium IDE – ide.openqa.org – firefox plugin • Assertions • Plugins • Selenium RC – Remote control, selenium-rc.openqa.org • PHPUnit integration • PHPUnit_Extensions_selenium_testcase (can set up using xvfb) • Can be fired via Cruisecontrol (phpUnderControl for mgmt), Continuum, Xinc • Virtual Machines – Snapshot mgmt • Side note – Red hat switching to KVM from XEN.

  24. Scaling PHP Application • Maurice Kherlakian – Bell Canada • Scalability • Performance vs High Availability • Load Balancers – Soft vs hardware • Session Persistence – Sticky, Sharing (memcached), Session Clusting in Z. Platform • Synchronization – Rsync –avz • Static Content Separation • Memory consumption • Use low-memory http server (lighttpd, thttpd) or cdn

  25. Database • Master-slave, dual master, replication • DRDB = master-slave, HA, no perf gain • Mysql cluster • Partitioning, sharding • Tools – mysql_sla, slow query log, monyog • Code Acceleration • XCache, APC, eAccelerator, Zend Platform • DB Requests • HTML Caching • Client side – etags, expire headers • Code Design • Standards, Zend Framework • Plan Plan Plan! • Ensure Compatibility

  26. Final Keynote • Mark deVisser – American Cancer Society • Social network for cancer stories • www.sharinghope.tv • VMIX for video back end • “Code Against Cancer” requesting help

More Related