opencms days 2016: opencms at the swiss seismological service
TRANSCRIPT
![Page 1: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/1.jpg)
27/09/2016
OpenCms at the Swiss Seismological Service
Providing a new website
![Page 2: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/2.jpg)
Contents
• Tasks of the Swiss Seismological Service
• Selected Requirements for Website
• Solutions for:
• Multi-language
• Realtime information
• Cluster Setup, (with Alkacon OCEE)
• High Load
• Operational reliability
• Questions
27/09/2016 2
Enrico Ballarin Dolfin
![Page 3: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/3.jpg)
27/09/2016
Earthquakes in Switzerland
![Page 4: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/4.jpg)
27/09/2016 4
Earthquakes in Switzerland
Earthquakes may occur anytime and anywhere in Switzerland
Earthquakes are the natural hazard with the highest damage potential in
Switzerland
• Approximately 500 to 800 registered
earthquakes every year
• Each year on average 10 to 15 earthquakes
that are strong enough to be felt by the
population
• In comparison with other European countries,
Switzerland faces a moderate seismic hazard
![Page 5: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/5.jpg)
27/09/2016
The Swiss Seismological Service
![Page 6: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/6.jpg)
27/09/2016 6
The Swiss Seismological Service at ETH Zurich
- the federal agency for earthquakes.
Tasks:
• Monitoring of seismic activity in Switzerland and its neighbouring countries
• Assessment of seismic hazard in Switzerland
• Alarming and informing the authorities, the public, and the media
• Research and teaching
• Swiss involvement in the international
monitoring of the Nuclear Test Ban Treaty (CTBT)
![Page 7: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/7.jpg)
27/09/2016 7
Informed at Any Time
• The website provides detailed information on
current earthquakes in Switzerland and abroad
within around 90 seconds, plus a range of
background information
• Automatic alarm to the authorities and
the media
• All earthquakes with a magnitude of 2.5 or
greater in Switzerland or neighboring
countries on Twitter
@seismoCH_D, @seismoCH_I, @seismoCH_F, @seismoCH_E
• Media reports for television, radio and
press
• Did you feel it? Enter your observations in
the online questionnaire on the SED website
![Page 8: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/8.jpg)
27/09/2016
OpenCms at the Seismological Service
![Page 9: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/9.jpg)
OpenCms at the Seismological Service
Current ~ 10 Independent Installations,
for websites of scientific projects and data access
Planned Go Live with renewed main website www.seismo.ethz.ch within next 10 days
27/09/2016 9
mostly OpenCms 9.5
![Page 10: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/10.jpg)
27/09/2016
2. Selected Requirements for the Website
![Page 11: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/11.jpg)
Requirements - overview
• Full information in 4 languages
• Extremely dynamic information (automatically prepared)
• Extreme peak access rates on dynamic information
• Redundancy required for high availability in case of infrastructure failure
27/09/2016
![Page 12: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/12.jpg)
27/09/2016
6. Causes of Earthquakes and the Processes Inolved
![Page 13: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/13.jpg)
27/09/2016
• Multi Language (4 Languages)• English, (Default)• German,• French• Italian
• Unique URLs with prefix for the same content
![Page 14: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/14.jpg)
www.seismo.ethz.ch/DE/knowledge/things-to-know/causes-of-earthquakes/general/
27/09/2016
![Page 15: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/15.jpg)
27/09/2016
www.seismo.ethz.ch/EN/knowledge/things-to-know/causes-of-earthquakes/general/
![Page 16: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/16.jpg)
27/09/2016
Alarming and Information
![Page 17: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/17.jpg)
27/09/2016 17
Role of the Website in Alarming and Information
• «What happened» information within one to two minutes
• Warning of possible aftershocks or further strong shocks
• Advice on how to behave
• Access to relevant scientific and engineering data (e.g., ground motion)
![Page 18: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/18.jpg)
Publishing Real time (~2 min) Informations
27/09/2016 18
Multi-language requirements
![Page 19: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/19.jpg)
27/09/2016
“Challenging” Loads on Page after an earthquake
![Page 20: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/20.jpg)
Earthquake on 2016-06-24 06:12, Sion VS, Magnitude 3.2
27/09/2016 20
potentially felt by ~ 50’000 Persons
![Page 21: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/21.jpg)
Earthquake on 2016-06-25 06:12, Sion VS, Magnitude 3.2
27/09/2016 21
![Page 22: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/22.jpg)
Earthquake on 2016-06-25 06:12, Sion VS, Magnitude 3.2,
Time dependent Load first Minutes after earthquake
Max Load: Gbit/s
27/09/2016 22
![Page 23: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/23.jpg)
Earthquake on 2012-02-11 23:45, Zug, Magnitude 4.2
27/09/2016 23
potentially felt by >1 mio. Persons
![Page 24: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/24.jpg)
Earthquake on 2012-02-11 23:45, Zug, Magnitude 4.2
Server Limit Reached, with
Expected about 100’000 Pageloads within first 5 Minutes …
27/09/2016 24
?
![Page 25: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/25.jpg)
27/09/2016
Reliability and Redundancy
Earthquake from 1356 in Basel,As shown in “Cosmographia” by Sebastian Münster 1550
![Page 26: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/26.jpg)
Contents
• Tasks of the Swiss Seismological Service
• Selected Requirements for Website:
• Solutions for:
• Multi-language
• Realtime information
• Cluster Setup, (with Alkacon OCEE)
• High Loads
• Operational reliability
• Questions
27/09/2016 26
Enrico Ballarin-Dolfin
![Page 27: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/27.jpg)
Multi-language – General Concepts
Idea:
• Based on the SWITCH (Swiss universities backbone network provider) multi-language implementation
Requirements:
• SED web sites are needed in the English, German, French and Italian
• English is the default language
• Only one page document for all the available languages
Implementation
• Creation of a custom module for multi-language web sites
• Changes in the OpenCms configuration files
• Changes in the standard OpenCms search implementation
![Page 28: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/28.jpg)
Multi-language – URL Language Filter
The URL language filter takes care of removing the language part from the URL and to set the corresponding locale
• Our OpenCms installation contains only one container page for all the available languages, e.g. http://<host>/home/(URLs like http://<host>/de/home/ don't exist in the file system)
• An URL without a language prefix is considered to be in English, the default language
Client
Web Listener
Servlet Container
URL Language Filter
Servlet
Request
Response
Link Substitution Handler
Menu Navigation
URL before filter URL after filter Extracted locale
http://<host>/de/home/ http://<host>/home/ de
http://<host>/fr/home/ http://<host>/home/ fr
http://<host>/it/home/ http://<host>/home/ it
http://<host>/en/home/ http://<host>/home/ en
http://<host>/home/ http://<host>/home/ en
![Page 29: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/29.jpg)
Multi-language – Link Substitution Handler and menu Navigation
The link substitution handler adds a language prefix to the processed link. This language prefix (e.g. /de for German) will be used by the URL language filter to determine the language the requested resource should be delivered with
It is also used to switch the used language after clicking a link in the page
The multi-language menu navigation is built dynamically using the content of the NavText_<language> property corresponding to the actual locale
URL Locale URL after substitution handler
http://<host>/home/ de http://<host>/de/home/
http://<host>/home/ fr http://<host>/fr/home/
http://<host>/home/ it http://<host>/it/home/
http://<host>/home/ en http://<host>/home/
Locale Used navigation item text
de NavText_de
fr NavText_fr
it NavText_it
en NavText_en
![Page 30: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/30.jpg)
Multi-language – Java Implementation
• Implementation of Tomcat URL language filter classes
/ch/ethz/sed/ocms/filter/www/SEDOpenCmsLanguageFilter implements Filter/ch/ethz/sed/ocms/filter/www/SEDOpenCmsRequestWrapper extends HttpServletRequestWrapper
• Implementation of link substitution handler classes in OpenCms
/ch/ethz/sed/ocms/base/A_SEDCmsLinkSubstitutionHandler extends CmsDefaultLinkSubstitutionHandler/ch/ethz/sed/ocms/base/SEDCmsLinkSubstitutionHandlerMultiLang extends A_SEDCmsLinkSubstitutionHandler
• Cloning and modification of navigation classes in OpenCms
/org/opencms/jsp/CmsJspNavBuilder/org/opencms/jsp/CmsJspNavElement implements Comparable<CmsJspNavElement>
• All the compiled classes are stored in the SED module for multi-language web sites and exported at the right location in the file system installing the module
![Page 31: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/31.jpg)
Multi-language – Basic Installation (part 1)
• Install the SED multi-language module
• Add the needed languages in the opencms-system.xml file
<localesconfigured> <locale>en</locale> <locale>de</locale> <locale>fr</locale> <locale>it</locale></localeconfigured>
• Add the URL language filter configuration in the web.xml file
<filter> <filter-name>SEDOpenCmsLanguageFilter</filter-name> <filter-class>ch.ethz.sed.ocms.filter.www.SEDOpenCmsLanguageFilter</filter-class></filter>
<filter-mapping> <filter-name>SEDOpenCmsLanguageFilter</filter-name> <url-pattern>/*</url-pattern></filter-mapping>
![Page 32: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/32.jpg)
Multi-language – Basic Installation (part 2)
• Modify in the opencms-importexport.xml file the reference to the link substitution handler:
<linksubstitutionhandler>ch.ethz.sed.ocms.base.SEDCmsLinkSubstitutionHandlerMultiLang</linksubstitutionhandler>
• Add “locale” in the cache property of navigation-main.jsp file in the module com.alkacon.bootstrap.formatters
container-element;uri;user;locale
• Add „locale“ in the cache property of nav-breadcrumb.jsp and nav_main.jsp in the com.alkacon.bootstrap.formatters module
uri;user;locale;params=(startlevel)
• Add to the navigation formatters the logic that allows the user to switch the language (e.g. in the com.alkacon.bootstrap.formatters module)
• Restart Tomcat
![Page 33: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/33.jpg)
Multi-language – Site dependent and Search related Changes
• Create the NavText_en, NavText_de, NavText_fr and NavText_it properties in the site folder, so that they will be inherited in the whole site
• For every menu item fill text into the NavText_<language> properties
• The standard com.alkacon.bootstrap.search module lists the search results using the Title property of the container pages. This property is not language dependent
• We have modified the module, displaying instead the NavText_<language> property for every found item
• We had also to do some small changes in the search javascripts inside the com.alkacon.bootstrap.formatters module to include in the search also the NavText_<language> properties
![Page 34: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/34.jpg)
FlexiTable Module:Merging redactional content with OpenCMS-external data
aut omated
ana lysis
softwar es
ear th quakes
observation s
sh akin gmode ls
aut omated
rea do nlyrep licatio n
scientificd ata
opce ncmscontents
opencmsinstan ce
Boundary conditions:
• Big amounts of data objects,resulting from automatic and manual analysis
• Rapid updates
• Rule-based publication
Solution:
External DB content is added to pages, based on SQL „rules“
![Page 35: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/35.jpg)
How is it done?
Connection pools to different DB handled by opencms core, just like connections to OpenCMS' own DB
![Page 36: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/36.jpg)
How is it done?
Connection pools to different DB handled by opencms core, just like connections to OpenCMS' own DB
Query handling, especially dynamic modification (sorting, subselection, content edits) is handled by a bean
![Page 37: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/37.jpg)
How is it done?
Connection pools to different DB handled by opencms core, just like connections to OpenCMS' own DB
Query handling, especially dynamic modification (sorting, subselection, content edits) is handled by a bean
Structural representation of the content (as table, attribute list, diagram) is handled by formatters.
![Page 38: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/38.jpg)
How is it done?
Connection pools to different DB handled by opencms core, just like connections to OpenCMS' own DB
Query handling, especially dynamic modification (sorting, subselection, content edits) is handled by a bean
Structural representation of the content (as table, attribute list, diagram) is handled by formatters.
Different, site specific styles (zebra coloring, text formatting etc.) are handled with styles packages..
![Page 39: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/39.jpg)
Contents
• Tasks of the Swiss Seismological Service
• Selected Requirements for Website:
• Solutions for:
• Multi-language
• Realtime information
• Cluster Setup, (with Alkacon OCEE)
• High Loads
• Operational reliability
• Questions
27/09/2016 27
Enrico Ballarin-Dolfin
![Page 40: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/40.jpg)
27/09/2016 28
11/10/15
OpenCms Enterprise Extensions (OCEE)
Cluster
Clustering of Servers for combi-
nation with a load balancer
Add remote failover capability
and scaling for high traffic.
Replication
Copy repository data to a
remote database instances.
Automatically updated when
changed data is published.
![Page 41: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/41.jpg)
27/09/2016
![Page 42: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/42.jpg)
Used Hardware
27/09/2016
2 (4) ProLiant DL380 Gen9
OS Ubuntu Linux
Of which each 2 x Intel Xeon CPU
E5-2698 v3 @ 2.30GHz16/16 cores; 32 threads
256 GB Memory
hosting 4 VMs with OpenCMS1 PostgreSQL database (native)
![Page 43: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/43.jpg)
27/09/2016 31
OpenCms Cache Functionalities
Additional Cache and Header Settings, (Apache)
• Flex cache
• Image cache
• Core cache
• JSP repository
• Static export
• OCEE accelerator
• Mod_cache (“disk cache” in RAM)
• Page expiration tags in page headers
![Page 44: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/44.jpg)
Selected Load tests
27/09/2016 32
![Page 45: OpenCms Days 2016: OpenCms at the swiss seismological service](https://reader033.vdocument.in/reader033/viewer/2022042907/5880eea91a28ab0d358b7323/html5/thumbnails/45.jpg)
27/09/2016 Seite 33
Thank you for your interest!
Visit our soon new websitewww.seismo.ethz.ch