Brad Touesnard is an entrepreneur, podcaster, developer, and designer living in Nova Scotia, Canada.

OSCON 2006 Report

Painless Web Proxying with Apache mod_proxy (Justin Erenkrantz)

http://conferences.oreillynet.com/cs/os2006/view/e_sess/8403

Summary

Interesting talk that reinforced my thoughts on the ways that mod_proxy can be used. The native protocol support is very interesting, especially FastCGI.

Notes

  • Squid is a forward proxy cache
  • load balancing via mod_proxy only supported by Apache 2.2+
  • proxy SSL traffic via mod_ssl, J2EE traffic via mod_jk
  • FastCGI support is in trunk Apache 2.3+
  • Load balancing
  • support for sticky sessions for e.g. PHPSESSIONID
  • web interface for live configuring
  • proxy static content
  • ProxyPass /images !
  • Apache 2.2+ talk to Tomcat natively
  • BalanceMember ajp://server1/
  • FastCGI
    • single CGI process handling multiple requests
    • native support in 2.3+
    • BalanceMember fcgi://server1/
    • sends requests to FastCGI daemon
  • Caching
    • caching dynamic content to disk
    • using squid not as good as reverse proxy
    • htcacheclean – checks diskspace and controls cache size
  • slides at http://conferences.oreillynet.com/cs/os2006/view/e_sess/8521

    Summary

    Interesting talk about the ways Prototype wraps the JavaScript language and the power of this (see example below). The presenter had a nice JavaScript console I hadn’t seen before that he was using to execute JavaScript on the fly. Pretty cool stuff. We should definitely be looking at using Prototype for our ActiveCommerce JavaScript development.

    Notes

    Extending native objects:

    Object.extend(String.prototype, {
    
  • shout: function() { alert(this); }
  • }); "hello".shout();

    Cross-site Ajax: Challenges and Techniques for Building Rich Web 2.0 Mashups (Joseph Smarr)

    http://conferences.oreillynet.com/cs/os2006/view/e_sess/8923

    Summary

    This was a very cool presentation of workaround techniques to the dilema caused by the same-origin policy. Clearly proxying requests is the easiest way to circumvent this problem. Since proxying is not always an option however, other ways were discussed to workaround the problem. Notably the “JavaScript Wormhole” technique developed by the presenter is a very lightweight, transparent way to pass data across-domains.

    Notes

    • e.g. craigslist + google maps = housing maps mashup
    • workaround solutions to same-origin policy
    • proxying (DNS like we’re doing with Hitbox)
    • flash: need crossdomain.xml
    • JSON-P: use API, limited control, lot of trust required
  • technique for using JSON-P in OO web apps (cool!)
  • cool technique for cross-domain workaround: “The JavaScript Wormhole”
  • better solutions for the future
    • JSONRequest()
    • ContextAgnosticXMLHttpRequest()
  • http://conferences.oreillynet.com/cs/os2006/view/e_sess/9153

    Summary

    I had already seen a longer version of this talk on Google video and there was not much new in it unfortunately. During the questions however, Jacob did talk about how some of the organizations that use Django are doing the print. They have scripts that write the documents to PDFs/Illustrator files that can be sent to a print queue. Also the last slide in the presentation was a quote by David Ascher which he called his “favorite.”

    Notes

    • Not MVC, MTV – Model Template View
    • URL – rewriting
    • ChicagoCrime.org
    • printable by writting PDFs, Illustrator, etc.
    • favorite quote by David Ascher

    No Flash Required: Interactive Browser Graphics (Gavin Doughtie)

    http://conferences.oreillynet.com/cs/os2006/view/e_sess/8692

    Summary

    This talk confirmed that Flash has a viable future and that interactive browser graphics are a long ways off. The horrible disconnect between the FF and IE implementations of browser graphics is reminiscent of the Netscape/IE DHTML implementations of the late 90s, but surprisingly worse. The Google toolkit sounds very interesting, though I’m skeptical how good it actually is.

    Notes

    • use JavaScript to build SVG graphics for Firefox
    • use VML and CSS in IE
    • for FF
    • similar to GDI, Java Graphics
  • DirectAnimation for IE
    • obsolete
  • IE7 WPF, XAML
  • Ajax approaches
  • misconception: Photoshop better at resizing than GD/Imagemagik
    • cause: bad configuration
  • Excanvas (Google)
    • toolkit – write for FF and it generates equivalent for IE
  • Animation
    • DirectAnimation, HTML + TIME
    • setTimeout(), setInterval()
  • still lacking video, sound, input
  • PHP and Web 2.0 (Rasmus Lerdorf)

    http://conferences.oreillynet.com/cs/os2006/view/e_sess/8808

    Summary

    Interesting talk, a bit over my head at times as Rasmus was diving right into the inner workings of PHP. Callgrind is definitely something I need to look into to see what processes are up to on Linux and I also wonder if there is a similar tool for Windows. Most likely there is. The example of simplexml_load_file was very cool. Finally a simple/built-in/quick way to parse an XML document in PHP.

    Notes

    • Callgrind
    • run single instance web server
    • see what is actually happening with the process
  • APC directives in php.ini
    • increase speed of MySQL connections?
  • simplexml_load_file()
    • very cool, concise code

    AJAX + ASP.NET (Christian Wenz)

    http://conferences.oreillynet.com/cs/os2006/view/e_sess/8769

    Summary

    This was the best talk I attended in the Windows track. It was very good as it pointed the strengths and weaknesses of the MS Ajax framework, Atlas. I was impressed by the way that the server-side controls were consistent with the existing server-side controls and how easy it was to drop-in an existing control, like the calendar widget. Unfortunately, there were important features that I was not impressed with. The new XML-Script language they invented that you need to write to build a custom client-side control looked immature. It had no codesense in VS and appeared to be pretty horrible to write.

    Although it will require a bit more research, I don’t think Atlas is worth investing in at this point simply because it integrates well (supposedly) with the ASP.NET framework. Atlas is free to use in production.

    Notes

    • Atlas – MS Ajax framework
    • http://conferences.oreillynet.com/cs/os2006/view/e_sess/8646

      Summary

      Very cool talk, though of not much value for ActiveState. It was interesting that the presenter said that a threaded web server was bad and backed it up with good reasons. The techniques to improve efficiency and reduce bandwidth were definitely interesting. I also liked their custom logging and SSL processing hardware.

      Notes

      • removed Server: header
      • save bandwidth
      • security by obscurity
      • ??
    • Why Apache 1.3?
      • has most features they need
      • understand codebase
      • threads are bad
      • no C/C++ threads programmers
      • a child crashes, one user gets disconnected
      • better programming model
      • Common Logs
      • no standard place to put cookies, ads ids, etc
      • wasted bytes
      • use custom log file format
    • signal free log rotation
      • no pipes
      • just renaming
    • save bandwidth
      • use on-the-fly gzip, similar to mod_deflate
      • only when CPU 90% busy
    • servers
      • only use MaxClients, no Min, Max, SpareServers, or other crap
      • constant pool size
    • kernel buffering
      • SO_ACCEPTFILTER: Apache won’t wake from accept() until http headers are fully buffered from the socket by the kernel. cool.
      • more efficient use of server pool
    • SendBufferSize – make it large, avoid blocking
    • YahooHostHtmlContent
      • Comment at end of HTML pages <!– p22.sports.scd.yahoo.com compressed/chunked…
    • SSL acceleration hardware card
    • mod_whatkilledus.c is no good, dangerous
    • When Interface Design Attacks! (Amy Hoy)

      http://conferences.oreillynet.com/cs/os2006/view/e_sess/8924

      Summary

      Great presentation with lots of really great user interface design tips. The tips about forms was very good and we should consider employing some of these ideas on our web site.

      Notes

      I didn’t bother taking notes as the slides were very good: http://www.slash7.com/interface/interface_attacks.pdf

      The Underpants Gnomes Strategy Guide: An eCards Case Study (Terry Chay)

      http://conferences.oreillynet.com/cs/os2006/view/e_sess/8939

      Summary

      Really entertaining and great story. The morals sprinkled throughout the story were actually very good.

      Notes

      I didn’t bother taking notes. I’m sure he’ll have slides up soon.

      Writing Maintainable Code in PHP (Laura Thomson)

      http://conferences.oreillynet.com/cs/os2006/view/e_sess/8822

      Summary

      Good talk about maintainable PHP code that had some good points about general code maintainability as well. I really thought the Object-camelcase, otherwise underscore notation was intuitive and will use it in the future. Also, the stressed importance of a documented coding standard made me realize that we should establish one for the ActiveCommerce project as well as future projects.

      Notes

      • coding standards: PEAR and Zend
      • Hungarian notation: most abused ever?
      • Object have camelcase, otherwise underscores

      NUnit: Cross-platform Testing for .Net (Charlie Poole)

      http://conferences.oreillynet.com/cs/os2006/view/e_sess/9023

      Summary

      This was a pretty bad talk. Unfortunately the presenter was very slow and by the end he was only halfway through his slides and had not given any examples or advice of how to use nUnit effectively. Fortunately someone from the audience talked a bit about the status of Mono and as we were leaving and apparently a complete implementation of .NET 2.0 and C# is now supported by Mono. Something to definitely look into for moving ActiveCommerce to Linux in the future.

      Notes

      • like C, testing using main()
      • sUnit – composite pattern

      PHP Patterns (George Schlossnagle)

      http://conferences.oreillynet.com/cs/os2006/view/e_sess/8969

      Summary

      A really good overview of design patterns with a focus on implementation in PHP. Though a bit thin on details.

      Notes

      • not a lot to do with OOP, but associated because OOP was hot when introduced
      • template pattern, just extending classes
      • singleton pattern
      • only ever one instance of class at any time
      • difficult to inherit
    • factory pattern
    • aggregate pattern
      • CalendarAggregate->display(); iterates through items and calls display() on each
    • iterator pattern
      • pointless in PHP? just use arrays, but sometimes useful
      • e.g. test lines in a file, etc
    • decorator pattern
      • add additional functionality to an object
      • abstract class
    • proxy pattern
      • implement interface that we don’t know at compile time
      • PEAR SOAP
      • proxy requests to handler and let handler determine if it’s a valid request
    • composite pattern
    • adapter pattern
      • provides method for providing alternative interface to a class that your application needs or expects
    • observer pattern
      • shows a flexible way for objects to notify interested objects that something has happened
      • PEAR error class could use it
      • e.g. addHandler(new MailError(‘bradt@activestate.com’));
    • serializer pattern
      • __sleep() and __wakeup()–>