Your SlideShare is downloading. ×
0
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Compiled Websites with Plone, Django, Xapian and SSI
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Compiled Websites with Plone, Django, Xapian and SSI

1,516

Published on

Slides from RuPy 2009 talk "Compiled Websites with Plone, Django, Xapian and SSI" by Łukasz Langa and Wojciech Lichota.

Slides from RuPy 2009 talk "Compiled Websites with Plone, Django, Xapian and SSI" by Łukasz Langa and Wojciech Lichota.

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
  • Video from presentation:

    <br /><object type="application/x-shockwave-flash" data="http://blip.tv/play/AYG5kywC" width="350" height="288"><param name="movie" value="http://blip.tv/play/AYG5kywC"></param><embed src="http://blip.tv/play/AYG5kywC" width="350" height="288" type="application/x-shockwave-flash"></embed></object>
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
1,516
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
9
Comments
1
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Compiled Websites with Plone, Django and SSI Łukasz Langa" " Wojciech Lichota"
  • 2. Agenda   Reasoning   Plone and Static Deployment   Django and SSI   Search (Xapian)
  • 3.   Security solutions requiring 100% guarantee that the content cannot be edited from the Web Reasoning   Performance The Problem dynamic Websites are resource hungry   Quality Assurance the ability to review complete content and functionality before every deployment
  • 4.   Security front-end/back-end division two-level authentication Reasoning   Performance throwing hardware at the Existing Approaches problem caching   Quality Assurance dedicated workflow environments test instances
  • 5. Reasoning The Solution Website compilation
  • 6.   Convert all Website resources to static files   HTML   CSS   JS The Solution   attachments Static Deployment   media   Deploy the HTML on a traditional Web server ✓  orders of magnitude better performance ✓  incredibly simple scalability ✓  server-agnostic quality assurance
  • 7.   Examples:   HTTrack     wget  -­‐-­‐mirror   Static Deployment ✓  out-of-the-box solution with external tools ✗  weak control of output ✗  slow
  • 8.   Solutions for Plone:   enpraxis.staticsite     stxnext.staticdeployment   Static ✓  much faster than external Deployment solutions with internal tools ✓  fully configurable ✓  easy to customize ✗  needs integration with website
  • 9.   Open-Source (ZPL)   two parts of configuration Static   basic: for content editors   advanced: for Deployment administrators stxnext.staticdeployment     incremental   content transformations   pluggable   integration with Xapian
  • 10. stxnext.staticdeployment  
  • 11. stxnext.staticdeployment  
  • 12.   User profiles   Commenting Static   User communication Deployment   Search ...too static! We need something more sophisticated!
  • 13.   Plone + Static Deployment The Solution   Django for:   User profiles   Commenting   User communication   Xapian for search Compiled Website
  • 14. How to glue components together? The Solution   client-side approach: JavaScript ✓  simple implementation ✗  many requests ✗  page flickering   server-side approach: Apache SSI ✓  single request ✓  transparent to the user Compiled Website ✗  skin customization
  • 15.   HTML preprocessor provided by Apache httpd at least since version 1.3   Processing controlled by The Glue SGML comments   Basically enables: Apache mod_include (SSI)   conditional text   inclusion of other files   inclusion of programs   printing/setting environment variables
  • 16.   A basic SSI element: Apache mod_include <!-­‐-­‐#element  attribute=value  attribute=value  ...  -­‐-­‐>     no whitespace   Typical elements:   #include     #echo     #exec     #set     #if  /  #elif  /  #else  /  #endif  
  • 17.   Enabling SSI in the server configuration: Apache mod_include ...   LoadModule  include_module  modules/mod_include.so   ...   AddType  text/html  .html   AddOutputFilter  INCLUDES  .html   ...   Options  +Includes     Examples of basic directives:   current date on the server <!-­‐-­‐#echo  var="DATE_LOCAL"  -­‐-­‐>   file modification date Last  modified:  <!-­‐-­‐#flastmod  file="index.html"  -­‐-­‐>   inclusion of results from a dynamic application <!-­‐-­‐#include  virtual="/app-­‐comments/thread/3/"  -­‐-­‐>     executing local commands <!-­‐-­‐#exec  cmd="uptime"  -­‐-­‐>  
  • 18.   Inclusion of results from a dynamic application <!-­‐-­‐#include  virtual="/app-­‐comments/thread/3/"  -­‐-­‐>   Apache mod_include   How to specify an external application to be available from /app-­‐comments  ? RewriteEngine  on   RewriteRule  ^/app-­‐comments/(.*)$  http://localhost:8686/$1  [L,P]     What if the external application is not available?   Apache includes the following message by default: [an  error  occurred  while  processing  this  directive]     This can be customized in server configuration by: SSIErrorMsg  "<!-­‐-­‐  Error  -­‐-­‐>”     The default message can be overriden in HTML by: <!-­‐-­‐#config  errmsg=”Custom  message"  -­‐-­‐>  
  • 19.   context-specific arguments need to be GET params   by default Django uses URL parts Gotchas   redirect after POST requests Gluing Django with SSI   POST requests cannot render anything   form validation requires additional plumbing   Website templating in two places   Plone skin   Django templates
  • 20.   Apache is slow... Gotchas Apache httpd
  • 21.   Apache is slow... NOT!   mpm_prefork  is evil   use mpm_worker     any experience with mpm_event? Gotchas   Advantages of Apache: Apache httpd   largest install base   maturity measured in years   the best WSGI module available (mod_wsgi)
  • 22.    python-­‐xapian  binding   Ranked search What about   Suggests spelling corrections search?   no Polish stemming Xapian with SSI
  • 23. Compiled Websites Starring Łukasz Langa" lukasz.langa.pl lukasz@langa.pl @llanga "
  • 24. Compiled Websites Starring Wojciech Lichota www.lichota.pl wojciech@lichota.pl @wlichota "
  • 25. Compiled Websites Guest Starring Django Pony www.djangopony.com @djangopony "
  • 26. Questions?

×