Upload
alkacon-software-gmbh-co-kg
View
65
Download
0
Embed Size (px)
Citation preview
27/09/2016
OpenCms at the Swiss Seismological Service
Providing a new website
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
27/09/2016
Earthquakes in Switzerland
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
27/09/2016
The Swiss Seismological Service
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)
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
27/09/2016
OpenCms at the Seismological Service
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
27/09/2016
2. Selected Requirements for the Website
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
27/09/2016
6. Causes of Earthquakes and the Processes Inolved
27/09/2016
• Multi Language (4 Languages)• English, (Default)• German,• French• Italian
• Unique URLs with prefix for the same content
www.seismo.ethz.ch/DE/knowledge/things-to-know/causes-of-earthquakes/general/
27/09/2016
27/09/2016
www.seismo.ethz.ch/EN/knowledge/things-to-know/causes-of-earthquakes/general/
27/09/2016
Alarming and Information
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)
Publishing Real time (~2 min) Informations
27/09/2016 18
Multi-language requirements
27/09/2016
“Challenging” Loads on Page after an earthquake
Earthquake on 2016-06-24 06:12, Sion VS, Magnitude 3.2
27/09/2016 20
potentially felt by ~ 50’000 Persons
Earthquake on 2016-06-25 06:12, Sion VS, Magnitude 3.2
27/09/2016 21
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
Earthquake on 2012-02-11 23:45, Zug, Magnitude 4.2
27/09/2016 23
potentially felt by >1 mio. Persons
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
?
27/09/2016
Reliability and Redundancy
Earthquake from 1356 in Basel,As shown in “Cosmographia” by Sebastian Münster 1550
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
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
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
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
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
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>
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
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
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“
How is it done?
Connection pools to different DB handled by opencms core, just like connections to OpenCMS' own DB
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
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.
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..
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
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.
27/09/2016
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)
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
Selected Load tests
27/09/2016 32
27/09/2016 Seite 33
Thank you for your interest!
Visit our soon new websitewww.seismo.ethz.ch