Skip to content

Instantly share code, notes, and snippets.

@mhlavac
Created March 3, 2013 09:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhlavac/5075417 to your computer and use it in GitHub Desktop.
Save mhlavac/5075417 to your computer and use it in GitHub Desktop.
My notes from PHP UK Conference 2013

Event stream processing in php Ian Barber

joind.in: http://joind.in/talk/view/8040 slides: https://speakerdeck.com/ianbarber/event-stream-processing-in-php

  • Embedding event processing EEP.js (complex event processing)
    • reactphp.org - EEP.js ported to PHP
  • Stream operations
    • Workin with events, moving streams, mapping them, looking at them...
    • pipe system $...->pipe()->pipe()->pipe()
  • reactphp
    • can open sockets which are handled in loop (like node.js)
    • windows - operations on set of data
      • take specific number of events
      • take all events in specific time interval (wall clock)
      • sliding window - Emit on each event
    • doesn't store data... works with actual data (efficient)
    • log number of hits for different urls (/page 20x, /page/test 7x... etc...)
    • low rate detection
    • putting more streams together with muxed
    • using correlations to compare windows state (future prediction)

Looking Ahead: PHP 5.5 David Soria Parra

joind.in: https://joind.in/8061 slides: http://patches.experimentalworks.net/Looking%20Ahead%20PHP%205%20Animations.pdf

  • RFC
  • Release process
    • New Major releases every year in may
  • PHP 5.3 support 2008 - 2014
  • Add yourself to mailing lists
  • New features
    • Generators
      • Generator doesn't have rewind() method.
    • Password api
    • empty() can be called upon returned value from function
    • DateTimeImmutable
    • ::class
    • finally
    • MySQL Extension deprecated
    • preg_replace /e modifier deprecated (Really dangerous modifier)
  • Zend optimalizer
    • Opened source
    • Should be moved to the core (It won't be an extension as APC)
    • APC will get dropped from PHP and Zend optimalizer will takes it's place
  • C# properties won't be used (getter's & setter's)
  • Alpha 5 - Last alpha version
  • Ubuntu 2014 (official ppa for PHP 5.5)
  • Memory access reduction

API Design: It's Not Rocket Surgery Dave Ingram

joind.in: https://joind.in/8045 slides: https://speakerdeck.com/dmi/api-design-its-not-rocket-surgery-phpuk13

  • Make versioned urls
  • Use query arguments to filter output
  • OPTIONS - CORS - Cross Origin Resource Sharing
  • Headers, accept, accept-language...
  • Headers, ETag, If-..., Cache-Control, Expires,
  • OAuth2 (Extension OAuth2-MAC)
  • Should use OAuth 1.0a - What is the difference between oauth1.0a and Oauth2
  • HATEOAS
  • Preconditions - New in RFC6585 405, 406, 412..
  • Provide interactive console
  • Statistics

"Small Data" Machine Learning Andrei Zmievski

https://joind.in/8109 slides: https://speakerdeck.com/andreiz/small-data-machine-learning

  • Interesting presentation about how to create spam bot for Twitter

Planning to fail David

joind.in: https://joind.in/8055

  • Hailo (SOA 10+, AWS: 3 regions, 9 AZs)
  • Splitted application to more services
  • Technologies: Distrubted, Homogenous, Resilient
  • Cassandra - Data store
  • ZooKeeper - Distributed coordination
  • Elastic Search
  • NSQ - Message processing system designed to handle billions of messages per day
  • Cruftflake (Snowflake) - Distributed ID generation
  • Minimase the critical path
  • Memcache timeouts (connection timeouts)
  • Kill services while testing the service as a whole
  • Test if the service is acceptable with iptables
  • JMeter, Graphite with failure simulations
  • The best way to avoid failure is to fail contantly...
    • Automatic testing with random server failure

Monitoring at Scale: Intuitive Dashboard Design Lorenzo Alberton

joind.in: https://joind.in/8060 slides: http://www.slideshare.net/quipo/monitoring-at-scale-intuitive-dashboard-design

Bottleneck Analysis Ilia Alshanetsky

joind.in: https://joind.in/8047 slides: http://ilia.ws/files/phpuk_bottlenecks.pdf

  • Browser bottlenecks
  • Web server
  • Problem with DNS resolve with CDNs (jquery at google, microsoft...)
  • Javascript load blocking (try to load only one file or use somekind of dynamic loading)
  • Do not user SSL certificate on website that only redirects to other website when the user is not logged in. (example: first visit to http://example.com redirects to https://example.com and then the client is redirected to https://www.example.com - 3 requests)
  • Big cookies can be problem on connections with slow upstream (do not store too many items into cookies - Watch cookie size)
  • Test with slow connection to see what your application does
    • Can be tested with boomerang
  • W3C navigation timing api
  • Apache bench (ap)
  • Static tests (to test apache settings, global, vhosts, .htaccess)
    • Try to load static data from apache
    • Watch for flactuances in response time
    • Disk IO usage... you can check several values
  • Watch network IO
    • Set kernel buffer size to exactly same size as apache buffer and php buffer
  • xhprof
    • Profiling multiple requests
    • Profile only some % of trafic (don't affect your clients with slowdowns which are caused by your profiling)
  • Apache
    • log format %d %i %O - show how long it took to render the page...
  • Error, notice, warning - Logging takes time, do not log everything, or at least do not log to files
  • Caching bottleneck - Memcache stat
    • Problem with connection closed, connection refused. Timeout doesn't work!
  • Tools: statgrap

Future of PHP environment development Jeremy Quinton

joind.in: https://joind.in/8049 slides: http://www.slideshare.net/jeremyq/the-future-of-the-php-development-environment

  • How to set up developer working environment
  • Concept of production snowflake
  • Developer/Production parity concept
    • Developer environment should be as similiar as possible to production environment
  • Vagrant is the solution
    • Multiple VM environments (developer can simulate communication across many servers)
    • Config file:
      • Booting in :gui mode (to show what really happens to machine)
      • Use hostonly network settings
      • Use :nfs for share folder (samba share for windows)
    • New providers:
      • vmware
      • Amazon AWS
    • version 1.1 (completely rewritten plugin system)
  • VeeWee (builds box file)
    • jedi4ever/veewee (Possible solution for automatically created LAMP boxes)
  • Provisioning system - Chef

You Can't Optimise What You Can't Measure Juozas Kaziukėnas

joind.in: https://joind.in/8056

  • Statsd
  • Graphite
  • Logster (sends data to graphite)
  • datadoghq.com
  • gearman - queuing // Listener for all events which sends data to statsd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment