SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
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?

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 

Dernier (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

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