SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
Compiled Websites
                    with Plone, Django and SSI




Łukasz Langa"                                    "
Wojciech Lichota"
Agenda


  Reasoning

  Plone and Static Deployment

  Django and SSI

  Search (Xapian)
  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
  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
Reasoning
The Solution




               Website compilation
  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
  Examples:
                          HTTrack	
  
                          wget	
  -­‐-­‐mirror	
  
Static
Deployment            ✓  out-of-the-box solution

with external tools   ✗  weak control of output

                      ✗  slow
  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
  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
stxnext.staticdeployment	
  
stxnext.staticdeployment	
  
  User profiles

                   Commenting

Static             User communication

Deployment         Search

...too static!



                 We need something more
                 sophisticated!
  Plone + Static
                      Deployment
The Solution          Django for:
                        User profiles
                        Commenting
                        User communication

                      Xapian for search




 Compiled Website
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
  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
  A basic SSI element:




                                                                                   Apache mod_include
<!-­‐-­‐#element	
  attribute=value	
  attribute=value	
  ...	
  -­‐-­‐>	
  	
  



no whitespace




  Typical elements:
       #include	
  
       #echo	
  
       #exec	
  
       #set	
  
       #if	
  /	
  #elif	
  /	
  #else	
  /	
  #endif	
  
  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"	
  -­‐-­‐>	
  
  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"	
  -­‐-­‐>	
  
  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
  Apache is slow...




Gotchas
Apache httpd
  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)
  	
  python-­‐xapian	
  binding

                    Ranked search

What about          Suggests spelling
                     corrections
search?             no Polish stemming
Xapian with SSI
Compiled Websites
        Starring



      Łukasz Langa"
      lukasz.langa.pl
      lukasz@langa.pl
      @llanga




                        "
Compiled Websites
          Starring



     Wojciech Lichota
     www.lichota.pl
     wojciech@lichota.pl
     @wlichota




                           "
Compiled Websites
      Guest Starring




           Django Pony
           www.djangopony.com
           @djangopony




                                "
Questions?

Más contenido relacionado

La actualidad más candente

Get more than a cache back! - ConFoo Montreal
Get more than a cache back! - ConFoo MontrealGet more than a cache back! - ConFoo Montreal
Get more than a cache back! - ConFoo MontrealMaarten Balliauw
 
Side by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and SolrSide by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and SolrSematext Group, Inc.
 
Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageSATOSHI TAGOMORI
 
Benchmarking Solr Performance at Scale
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scalethelabdude
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화NAVER D2
 
Solr and Elasticsearch, a performance study
Solr and Elasticsearch, a performance studySolr and Elasticsearch, a performance study
Solr and Elasticsearch, a performance studyCharlie Hull
 
Apache Arrowフォーマットはなぜ速いのか
Apache Arrowフォーマットはなぜ速いのかApache Arrowフォーマットはなぜ速いのか
Apache Arrowフォーマットはなぜ速いのかKouhei Sutou
 
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...Lucidworks
 
MongoFr : MongoDB as a log Collector
MongoFr : MongoDB as a log CollectorMongoFr : MongoDB as a log Collector
MongoFr : MongoDB as a log CollectorPierre Baillet
 
Embulk and Machine Learning infrastructure
Embulk and Machine Learning infrastructureEmbulk and Machine Learning infrastructure
Embulk and Machine Learning infrastructureHiroshi Toyama
 
Practical Pig and PigUnit (Michael Noll, Verisign)
Practical Pig and PigUnit (Michael Noll, Verisign)Practical Pig and PigUnit (Michael Noll, Verisign)
Practical Pig and PigUnit (Michael Noll, Verisign)Swiss Big Data User Group
 
SQL for Elasticsearch
SQL for ElasticsearchSQL for Elasticsearch
SQL for ElasticsearchJodok Batlogg
 
Simple search with elastic search
Simple search with elastic searchSimple search with elastic search
Simple search with elastic searchmarkstory
 
Spark hands-on tutorial (rev. 002)
Spark hands-on tutorial (rev. 002)Spark hands-on tutorial (rev. 002)
Spark hands-on tutorial (rev. 002)Jean-Georges Perrin
 
AWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまでAWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまで崇之 清水
 
Debugging and Testing ES Systems
Debugging and Testing ES SystemsDebugging and Testing ES Systems
Debugging and Testing ES SystemsChris Birchall
 
Why Is My Solr Slow?: Presented by Mike Drob, Cloudera
Why Is My Solr Slow?: Presented by Mike Drob, ClouderaWhy Is My Solr Slow?: Presented by Mike Drob, Cloudera
Why Is My Solr Slow?: Presented by Mike Drob, ClouderaLucidworks
 
Data Exploration with Apache Drill: Day 1
Data Exploration with Apache Drill:  Day 1Data Exploration with Apache Drill:  Day 1
Data Exploration with Apache Drill: Day 1Charles Givre
 

La actualidad más candente (20)

Get more than a cache back! - ConFoo Montreal
Get more than a cache back! - ConFoo MontrealGet more than a cache back! - ConFoo Montreal
Get more than a cache back! - ConFoo Montreal
 
Side by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and SolrSide by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and Solr
 
Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby Usage
 
Benchmarking Solr Performance at Scale
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scale
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화
 
Solr and Elasticsearch, a performance study
Solr and Elasticsearch, a performance studySolr and Elasticsearch, a performance study
Solr and Elasticsearch, a performance study
 
Apache Arrowフォーマットはなぜ速いのか
Apache Arrowフォーマットはなぜ速いのかApache Arrowフォーマットはなぜ速いのか
Apache Arrowフォーマットはなぜ速いのか
 
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
High Performance Solr and JVM Tuning Strategies used for MapQuest’s Search Ah...
 
MongoFr : MongoDB as a log Collector
MongoFr : MongoDB as a log CollectorMongoFr : MongoDB as a log Collector
MongoFr : MongoDB as a log Collector
 
Embulk and Machine Learning infrastructure
Embulk and Machine Learning infrastructureEmbulk and Machine Learning infrastructure
Embulk and Machine Learning infrastructure
 
Practical Pig and PigUnit (Michael Noll, Verisign)
Practical Pig and PigUnit (Michael Noll, Verisign)Practical Pig and PigUnit (Michael Noll, Verisign)
Practical Pig and PigUnit (Michael Noll, Verisign)
 
SQL for Elasticsearch
SQL for ElasticsearchSQL for Elasticsearch
SQL for Elasticsearch
 
Simple search with elastic search
Simple search with elastic searchSimple search with elastic search
Simple search with elastic search
 
URLSession Reloaded
URLSession ReloadedURLSession Reloaded
URLSession Reloaded
 
Spark hands-on tutorial (rev. 002)
Spark hands-on tutorial (rev. 002)Spark hands-on tutorial (rev. 002)
Spark hands-on tutorial (rev. 002)
 
Tuning Solr for Logs
Tuning Solr for LogsTuning Solr for Logs
Tuning Solr for Logs
 
AWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまでAWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまで
 
Debugging and Testing ES Systems
Debugging and Testing ES SystemsDebugging and Testing ES Systems
Debugging and Testing ES Systems
 
Why Is My Solr Slow?: Presented by Mike Drob, Cloudera
Why Is My Solr Slow?: Presented by Mike Drob, ClouderaWhy Is My Solr Slow?: Presented by Mike Drob, Cloudera
Why Is My Solr Slow?: Presented by Mike Drob, Cloudera
 
Data Exploration with Apache Drill: Day 1
Data Exploration with Apache Drill:  Day 1Data Exploration with Apache Drill:  Day 1
Data Exploration with Apache Drill: Day 1
 

Destacado

Apache http server - proste i zaawansowane przypadki użycia
Apache http server - proste i zaawansowane przypadki użyciaApache http server - proste i zaawansowane przypadki użycia
Apache http server - proste i zaawansowane przypadki użyciaWojciech Lichota
 
Sandman - makes things REST
Sandman - makes things RESTSandman - makes things REST
Sandman - makes things RESTWojciech Lichota
 
Transakcyjność w django
Transakcyjność w djangoTransakcyjność w django
Transakcyjność w djangoMarcin Baran
 
Zwinność procesu rekrutacyjnego w branży IT
Zwinność procesu rekrutacyjnego w branży ITZwinność procesu rekrutacyjnego w branży IT
Zwinność procesu rekrutacyjnego w branży ITSTX Next
 
Pyra stxnext
Pyra stxnextPyra stxnext
Pyra stxnextradekj200
 
Raspberry pi - tiny hardware, huge idea
Raspberry pi - tiny hardware, huge ideaRaspberry pi - tiny hardware, huge idea
Raspberry pi - tiny hardware, huge ideaWojciech Lichota
 
Jak przygotować się do rozmowy rekrutacyjnej na Python Developera
Jak przygotować się do rozmowy rekrutacyjnej na Python DeveloperaJak przygotować się do rozmowy rekrutacyjnej na Python Developera
Jak przygotować się do rozmowy rekrutacyjnej na Python DeveloperaWojciech Lichota
 
Anty-wzorce w różnorodności w branży it
Anty-wzorce w różnorodności w branży itAnty-wzorce w różnorodności w branży it
Anty-wzorce w różnorodności w branży itAgata Landzwójczak
 
Continuous Deployment aplikacji w Django
Continuous Deployment aplikacji w DjangoContinuous Deployment aplikacji w Django
Continuous Deployment aplikacji w DjangoWojciech Lichota
 

Destacado (12)

Grok Artykul
Grok ArtykulGrok Artykul
Grok Artykul
 
Apache http server - proste i zaawansowane przypadki użycia
Apache http server - proste i zaawansowane przypadki użyciaApache http server - proste i zaawansowane przypadki użycia
Apache http server - proste i zaawansowane przypadki użycia
 
Sandman - makes things REST
Sandman - makes things RESTSandman - makes things REST
Sandman - makes things REST
 
Grok Prezentacja
Grok PrezentacjaGrok Prezentacja
Grok Prezentacja
 
Jak działa CPython
Jak działa CPythonJak działa CPython
Jak działa CPython
 
Transakcyjność w django
Transakcyjność w djangoTransakcyjność w django
Transakcyjność w django
 
Zwinność procesu rekrutacyjnego w branży IT
Zwinność procesu rekrutacyjnego w branży ITZwinność procesu rekrutacyjnego w branży IT
Zwinność procesu rekrutacyjnego w branży IT
 
Pyra stxnext
Pyra stxnextPyra stxnext
Pyra stxnext
 
Raspberry pi - tiny hardware, huge idea
Raspberry pi - tiny hardware, huge ideaRaspberry pi - tiny hardware, huge idea
Raspberry pi - tiny hardware, huge idea
 
Jak przygotować się do rozmowy rekrutacyjnej na Python Developera
Jak przygotować się do rozmowy rekrutacyjnej na Python DeveloperaJak przygotować się do rozmowy rekrutacyjnej na Python Developera
Jak przygotować się do rozmowy rekrutacyjnej na Python Developera
 
Anty-wzorce w różnorodności w branży it
Anty-wzorce w różnorodności w branży itAnty-wzorce w różnorodności w branży it
Anty-wzorce w różnorodności w branży it
 
Continuous Deployment aplikacji w Django
Continuous Deployment aplikacji w DjangoContinuous Deployment aplikacji w Django
Continuous Deployment aplikacji w Django
 

Similar a Compiled Websites with Plone, Django, Xapian and SSI

The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repositorynobby
 
Galaxy
GalaxyGalaxy
Galaxybosc
 
Java Build Tools
Java Build ToolsJava Build Tools
Java Build Tools­Avishek A
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleArnaud LEMAIRE
 
Optimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEMOptimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEMGabriel Walt
 
Continuous integration / continuous delivery
Continuous integration / continuous deliveryContinuous integration / continuous delivery
Continuous integration / continuous deliveryEatDog
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soad0nn9n
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationDavid Amend
 
See Hudson Run, Run Hudson, Run [SELF 2010]
See Hudson Run, Run Hudson, Run [SELF 2010]See Hudson Run, Run Hudson, Run [SELF 2010]
See Hudson Run, Run Hudson, Run [SELF 2010]Vincent Batts
 
Continuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsContinuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsEvgeniy Kuzmin
 
What is App Engine? O
What is App Engine? OWhat is App Engine? O
What is App Engine? Oikailan
 
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978David Chou
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
(Don't) Go Tracing Server Calls
(Don't) Go Tracing Server Calls(Don't) Go Tracing Server Calls
(Don't) Go Tracing Server CallsBrandon Hunter
 
S60 3rd FP2 Widgets
S60 3rd FP2 WidgetsS60 3rd FP2 Widgets
S60 3rd FP2 Widgetsromek
 
Web前端性能分析工具导引
Web前端性能分析工具导引Web前端性能分析工具导引
Web前端性能分析工具导引冰 郭
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaAmazon Web Services
 

Similar a Compiled Websites with Plone, Django, Xapian and SSI (20)

The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
 
Galaxy
GalaxyGalaxy
Galaxy
 
Java Build Tools
Java Build ToolsJava Build Tools
Java Build Tools
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & Ansible
 
Optimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEMOptimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEM
 
Continuous integration / continuous delivery
Continuous integration / continuous deliveryContinuous integration / continuous delivery
Continuous integration / continuous delivery
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soa
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
Performance on a budget
Performance on a budgetPerformance on a budget
Performance on a budget
 
See Hudson Run, Run Hudson, Run [SELF 2010]
See Hudson Run, Run Hudson, Run [SELF 2010]See Hudson Run, Run Hudson, Run [SELF 2010]
See Hudson Run, Run Hudson, Run [SELF 2010]
 
Continuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsContinuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applications
 
What is App Engine? O
What is App Engine? OWhat is App Engine? O
What is App Engine? O
 
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
(Don't) Go Tracing Server Calls
(Don't) Go Tracing Server Calls(Don't) Go Tracing Server Calls
(Don't) Go Tracing Server Calls
 
S60 3rd FP2 Widgets
S60 3rd FP2 WidgetsS60 3rd FP2 Widgets
S60 3rd FP2 Widgets
 
Web前端性能分析工具导引
Web前端性能分析工具导引Web前端性能分析工具导引
Web前端性能分析工具导引
 
slides (PPT)
slides (PPT)slides (PPT)
slides (PPT)
 
ESIGate dev meeting #4 21-11-2013
ESIGate dev meeting #4 21-11-2013ESIGate dev meeting #4 21-11-2013
ESIGate dev meeting #4 21-11-2013
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 

Último

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Último (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Compiled Websites with Plone, Django, Xapian and SSI

  • 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
  • 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 "