an integrated, fail safe e-business platform based on open source solutions
TRANSCRIPT
![Page 1: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/1.jpg)
2015
An integrated, fail-safe e-business platform
2015
schweizmobilplus.ch
![Page 4: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/4.jpg)
2015
fastforwardMagnolia integration
2015
fully certified lots of
experience with migration to
Magnolia 5
let’s talk!
since first release
![Page 5: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/5.jpg)
2015
The clientSchweizMobil
2015
Trails
Guide books
map.schweizmobil.ch
App
![Page 6: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/6.jpg)
2015
Premium featuresSchweizMobilPlus
draw
save
export
offline
![Page 7: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/7.jpg)
2015
The websiteSchweizMobil
promotesell
FAQ
![Page 8: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/8.jpg)
2015
The websiteSchweizMobil
responsive(Bootstrap)
live server-side validation
(AJAX)
coupons
e-payment
![Page 9: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/9.jpg)
2015
System architecture
Website
Address DB
User authentication
Map
SwissPass
E-Payment
![Page 10: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/10.jpg)
2015
Unreliable data exchangeProblem # 1
web serviceAddress
DB Problem # 2
Demanding users
![Page 11: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/11.jpg)
2015
Website
Address DB
User authentication
Map
SwissPass
E-Payment
R1: independentsystems
R2:
no data
loss
R3:
automatic
synching
![Page 12: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/12.jpg)
2015
LDAP master + slaves
Website
Address DB
User authentication
Map
SwissPass
E-Payment
Decoupling solution#1
+
LDAP master
LDAP slave
LDAP slave
LDAP slave
![Page 13: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/13.jpg)
2015
Import text files with updates
Website
Address company
User administration
Map
SwissPass
E-Payment
Data module Importer triggers
import jobs with
Scheduler module
Decoupling solution#2slave DB
custom Importer: (scp)
master DB
m5.txt
![Page 14: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/14.jpg)
2015
Message Queue
Tomcat
Message Queue
publicauthor
web service
DB
Decoupling solution#3
![Page 15: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/15.jpg)
2015
Message Queue
Tomcat
Message Queue
publicauthor
web service
DB
R4: simple
integrated Message Queue
![Page 16: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/16.jpg)
2015
Message Queue
Java VM
Tomcat
publicauthorsaveOrder()onMessage()
web service
DB
![Page 17: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/17.jpg)
20152015
Implementation details
![Page 19: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/19.jpg)
2015
1. Share librariesJava VM
Tomcat
Message Queue
publicauthor
lib/activemq
web service
DB
Class loader
lib/jms
lib/activemqlib/jms
lib/activemqlib/jms
![Page 20: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/20.jpg)
2015
2. JNDI: define resourceJava VM
Tomcat
Message Queue
publicauthor
conf/server.xml
web service
DB
<GlobalNamingResources> <Resource
name=„jms/ConnectionFactory“auth=„Container"type=„org.apache.activemq.ActiveMQConnectionFactory"description="JMS Connection Factory“factory=„org.apache.activemq.jndi.JNDIReferenceFactory"brokerName=„MyActiveMQBroker"brokerURL=„vm://schweizmobil" />…
</GlobalNamingResources>
![Page 21: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/21.jpg)
2015
3. JNDI: configure contextJava VM
Tomcat
Message Queue
publicauthor
conf/context.xml
web service
DB
<ResourceLink global="jms/ConnectionFactory" name="jms/ConnectionFactory" />
![Page 22: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/22.jpg)
2015
4. JNDI: lookup objects
Tomcat
Message Queue
publicauthor
conf/context.xml
web service
DB
import javax.naming.Context;import javax.naming.InitialContext;import javax.naming.NamingException;…ActiveMQConnectionFactory connectionFactory;Context initCtx = new InitialContext();Context envCtx = (Context) initCtx.lookup("java:comp/env");connectionFactory = (ActiveMQConnectionFactory) envCtx.lookup("jms/ConnectionFactory");
![Page 23: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/23.jpg)
2015
5. Produce message
Message Queue
publicauthor
web service
DB
saveOrder()
shared repository
pitfall:
time lag with
clustered repo
delay message(a couple of seconds)
![Page 24: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/24.jpg)
2015
6. Consume message: configure queue
Message Queue
publicauthor
web service
DB
/WEB-INF/config/default/magnolia.properties
onMessage()
pitfall*: consumer on more than instance
/WEB-INF/config/author/magnolia.properties
magnolia.activemq.brokerURI=vm://schweizmobilmagnolia.activemq.enableProducer=falsemagnolia.activemq.enableConsumer=truemagnolia.activemq.consumerRedeliveries=3magnolia.activemq.consumerRedeliveryDelay=30000magnolia.activemq.consumerUseExponentialBackOff=true
magnolia.activemq.brokerURI=vm://schweizmobilmagnolia.activemq.enableProducer=falsemagnolia.activemq.enableConsumer=falsemagnolia.activemq.consumerRedeliveries=3magnolia.activemq.consumerRedeliveryDelay=30000magnolia.activemq.consumerUseExponentialBackOff=true
magnolia.activemq.brokerURI=vm://schweizmobilmagnolia.activemq.enableProducer=falsemagnolia.activemq.enableConsumer=truemagnolia.activemq.consumerRedeliveries=3magnolia.activemq.consumerRedeliveryDelay=30000magnolia.activemq.consumerUseExponentialBackOff=true
*single-war deployment
![Page 25: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/25.jpg)
2015
Message Queue
publicauthor
web service
DB
if (!MgnlContext.hasInstance()) { MgnlContext.setInstance(new SimpleContext(Components.getComponent(SystemContext.class)));}// Do the work ...// ... then:MgnlContext.release();
pitfall:
MgnlContext.
getInstance()
NullPointerException
6. Consume message: MgnlContext
onMessage()
![Page 26: An integrated, fail safe e-business platform based on open source solutions](https://reader030.vdocuments.us/reader030/viewer/2022032504/55c4a8aabb61eb671f8b482a/html5/thumbnails/26.jpg)
2015
Demo